X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/e870e40d5fb975ba9ec0ec327014b3d16eea51e4..d26d6a7fdcb2c6e26fd097532765b62fd17b429c:/src/librarian/elements/footnotes/__init__.py diff --git a/src/librarian/elements/footnotes/__init__.py b/src/librarian/elements/footnotes/__init__.py index 6e00385..d0a0bf1 100644 --- a/src/librarian/elements/footnotes/__init__.py +++ b/src/librarian/elements/footnotes/__init__.py @@ -14,10 +14,19 @@ class Footnote(WLElement): footnote_id = 'footnote-idm{}'.format(self.attrib['_compat_ordered_id']) anchor_id = 'anchor-idm{}'.format(self.attrib['_compat_ordered_id']) - builder.start_element('a', {"href": '#{}'.format(footnote_id), "class": "annotation"}) + # Add anchor. + builder.start_element( + 'a', + { + "href": '#{}'.format(footnote_id), + "class": "annotation-anchor", + "id": anchor_id, + } + ) builder.push_text('[{}]'.format(fn_no)) builder.end_element() + # Add actual footnote. builder.enter_fragment('footnotes') builder.start_element('div', {'class': 'fn-{}'.format(self.tag)}) builder.push_text('\n') # Compat