Skip to content

Commit 800efb6

Browse files
Use label instead of number if present
1 parent 84d33c1 commit 800efb6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

ox-html-markdown-style-footnotes.el

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@
3737
(mapconcat
3838
(lambda (definition)
3939
(pcase definition
40-
(`(,n ,_ ,def)
40+
(`(,n ,label ,def)
4141
(format
42-
"<li id=\"fn.%d\" class=\"footdef\" role=\"doc-footnote\" tabindex=\"-1\">%s %s</li>\n"
43-
n
42+
"<li id=\"fn.%s\" class=\"footdef\" role=\"doc-footnote\" tabindex=\"-1\">%s %s</li>\n"
43+
(or label n)
4444
(org-trim (org-export-data def info))
45-
(format "<a href=\"#fnr.%d\" role=\"doc-backlink\">↩&#65038;</a>" n)))))
45+
(format "<a href=\"#fnr.%s\" role=\"doc-backlink\">↩&#65038;</a>" (or label n))))))
4646
definitions
4747
"\n")))))
4848
(funcall orig-fun info)))

ox-html-markdown-style-footnotes.org

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,12 @@ The updated copy is defined as ~org-html-markdown-style-footnotes--section~:
246246
(mapconcat
247247
(lambda (definition)
248248
(pcase definition
249-
(`(,n ,_ ,def)
249+
(`(,n ,label ,def)
250250
(format
251-
"<li id=\"fn.%d\" class=\"footdef\" role=\"doc-footnote\" tabindex=\"-1\">%s %s</li>\n"
252-
n
251+
"<li id=\"fn.%s\" class=\"footdef\" role=\"doc-footnote\" tabindex=\"-1\">%s %s</li>\n"
252+
(or label n)
253253
(org-trim (org-export-data def info))
254-
(format "<a href=\"#fnr.%d\" role=\"doc-backlink\">↩&#65038;</a>" n)))))
254+
(format "<a href=\"#fnr.%s\" role=\"doc-backlink\">↩&#65038;</a>" (or label n))))))
255255
definitions
256256
"\n")))))
257257
(funcall orig-fun info)))

0 commit comments

Comments
 (0)