Images: image@src is a URL, and image sizes are limited.
[librarian.git] / src / librarian / elements / footnotes / __init__.py
index 6e00385..0f30747 100644 (file)
@@ -1,3 +1,6 @@
+# -*- coding: utf-8
+from __future__ import unicode_literals
+
 from ..base import WLElement
 
 
@@ -14,10 +17,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