Add handling of footnotes to javascript filter. ihse-manpages-branch
authorihse
Tue, 30 Oct 2018 09:33:51 +0100
branchihse-manpages-branch
changeset 57007 19b7d582121d
parent 57006 44fe6d5e9c73
child 57008 cbd4d5fe2015
Add handling of footnotes to javascript filter.
make/scripts/pandoc-manpage-filter.js
--- a/make/scripts/pandoc-manpage-filter.js	Tue Oct 30 09:24:42 2018 +0100
+++ b/make/scripts/pandoc-manpage-filter.js	Tue Oct 30 09:33:51 2018 +0100
@@ -103,6 +103,12 @@
         }
     }
 
+    // Man pages does not have superscript. We use it for footnotes, so
+    // enclose in [...] for best representation.
+    if (type === 'Superscript') {
+        return [ Str('['), value[0], Str(']') ];
+    }
+
     // If it is a link, put the link name in bold. If it is an external
     // link, put it in brackets. Otherwise, it is either an internal link
     // (like "#next-heading"), or a relative link to another man page