diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/document-to-html.js | 7 | ||||
| -rw-r--r-- | lib/documents.js | 4 |
2 files changed, 5 insertions, 6 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) { diff --git a/lib/documents.js b/lib/documents.js index f293ec3..135e229 100644 --- a/lib/documents.js +++ b/lib/documents.js @@ -67,7 +67,7 @@ function Hyperlink(children, options) { function FootnoteReference(options) { return { type: types.footnoteReference, - footnoteNumber: options.footnoteNumber + footnoteId: options.footnoteId }; } @@ -75,7 +75,7 @@ function Footnote(options) { return { type: types.footnote, body: options.body, - footnoteNumber: options.footnoteNumber + id: options.id }; }; |
