From 28582bfa0fa0ed682f471039a5d5327486423a73 Mon Sep 17 00:00:00 2001 From: Suhail Shergill Date: Sun, 8 Apr 2012 10:49:51 -0400 Subject: [PATCH] org-html.el: Make footnotes unique to an entry * lisp/org-html.el (org-export-as-html): If possible, use the :CUSTOM_ID: property to assign unique ids to footnotes. TINYCHANGE --- lisp/org-html.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/org-html.el b/lisp/org-html.el index a2cf2c763..d9e763be6 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -1248,6 +1248,9 @@ PUB-DIR is set, use this as the publishing directory." (org-export-have-math nil) (org-export-footnotes-seen nil) (org-export-footnotes-data (org-footnote-all-labels 'with-defs)) + (custom-id (or (org-entry-get nil "CUSTOM_ID" t) "")) + (footnote-def-prefix (format "fn-%s" custom-id)) + (footnote-ref-prefix (format "fnr-%s" custom-id)) (lines (org-split-string (org-export-preprocess-string @@ -1685,7 +1688,7 @@ PUB-DIR is set, use this as the publishing directory." (format (concat "%s" (format org-export-html-footnote-format - (concat "%s"))) + (concat "%s"))) (or (match-string 1 org-line) "") n extra n n) ;; If another footnote is following the ;; current one, add a separator. @@ -1773,7 +1776,8 @@ PUB-DIR is set, use this as the publishing directory." (format (concat "

" (format org-export-html-footnote-format - "%s")) + (concat + "%s"))) n n n) t t org-line))))) ;; Check if the line break needs to be conserved (cond