aboutsummaryrefslogtreecommitdiff
path: root/lib/document-to-html.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-06-10 15:27:47 +0100
committerMichael Williamson <mike@zwobble.org>2014-06-10 15:27:47 +0100
commit1fb926a39b9b63513a2d226957ee1b11846f18be (patch)
tree25dcf6161ca3061488efe05bdd8482911fa091c1 /lib/document-to-html.js
parent03293a8e2265dd84eb05a31b8100cf1a310c51bb (diff)
Use footnote IDs instead of numbers
Diffstat (limited to 'lib/document-to-html.js')
-rw-r--r--lib/document-to-html.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js
index 5e50e89..6387142 100644
--- a/lib/document-to-html.js
+++ b/lib/document-to-html.js
@@ -156,16 +156,15 @@ function DocumentConverter(options) {
});
},
"footnoteReference": function(element, html, messages, callback) {
- var number = element.footnoteNumber.toString();
html.open(htmlPaths.element("sup"));
- html.open(htmlPaths.element("a", {href: "#footnote-" + number}));
- html.text(element.footnoteNumber.toString());
+ html.open(htmlPaths.element("a", {href: "#footnote-" + element.footnoteId}));
+ html.text(element.footnoteId.toString());
html.close();
html.close();
callback();
},
"footnote": function(element, html, messages, callback) {
- html.open(htmlPaths.element("li", {id: "footnote-" + element.footnoteNumber}));
+ html.open(htmlPaths.element("li", {id: "footnote-" + element.id}));
var footnoteHtml = new HtmlGenerator();
convertElements(element.body, footnoteHtml, messages, function(err) {
if (err) {