X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/88f39c4f90a67164b2c3da7c7a41df420f3b17ab..011b98a4661b754a0789ae78e145437b5b86e5fe:/src/librarian/elements/footnotes/__init__.py diff --git a/src/librarian/elements/footnotes/__init__.py b/src/librarian/elements/footnotes/__init__.py index 76be8e8..a94b968 100644 --- a/src/librarian/elements/footnotes/__init__.py +++ b/src/librarian/elements/footnotes/__init__.py @@ -6,8 +6,10 @@ from ..base import WLElement class Footnote(WLElement): NO_TOC = True + DISABLE_NUMBERING = True START_INLINE = True ASIDE = True + NUMBERING = 'fn' def signal(self, signal): if signal == 'INLINE': @@ -22,10 +24,9 @@ class Footnote(WLElement): if not builder.with_footnotes: return - builder.footnote_counter += 1 - fn_no = builder.footnote_counter - footnote_id = 'footnote-idm{}'.format(self.attrib['_compat_ordered_id']) - anchor_id = 'anchor-idm{}'.format(self.attrib['_compat_ordered_id']) + fn_no = self.attrib.get('_visible_numbering') + footnote_id = 'footnote-id{}'.format(fn_no) + anchor_id = 'anchor-id{}'.format(fn_no) # Add anchor. builder.start_element(