org-html-footnote-reference: Fix duplicate IDs
* lisp/ox-html.el (org-html-footnote-reference): When multiple footnote references point to a single footnote, make sure that the reference ids are not duplicated. Now, the ids for non-first reference are constructed as fn.<footnote id>.<footnote reference number>. The reference number of counted across all the footnote references referencing the same footnote. Reported-by: Protesilaos Stavrou <info@protesilaos.com> Link: https://orgmode.org/list/87cyqcv9q1.fsf@protesilaos.com
This commit is contained in:
parent
065af4b42a
commit
e0f24a3f6d
|
@ -2762,7 +2762,15 @@ CONTENTS is nil. INFO is a plist holding contextual information."
|
|||
(if (org-export-footnote-first-reference-p
|
||||
footnote-reference info)
|
||||
""
|
||||
".100"))))
|
||||
(let ((label (org-element-property :label footnote-reference)))
|
||||
(format
|
||||
".%d"
|
||||
(org-export-get-ordinal
|
||||
footnote-reference info '(footnote-reference)
|
||||
`(lambda (ref _)
|
||||
(if ,label
|
||||
(equal (org-element-property :label ref) ,label)
|
||||
(not (org-element-property :label ref)))))))))))
|
||||
(format
|
||||
(plist-get info :html-footnote-format)
|
||||
(org-html--anchor
|
||||
|
|
Loading…
Reference in New Issue