diff options
| author | Michael Williamson <mike@zwobble.org> | 2015-01-19 22:48:32 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2015-01-19 22:48:32 +0000 |
| commit | 58cae6030e51481ffb462e52ab6aeb479e0a705d (patch) | |
| tree | 4e12f82c07c63e03812a4e5d09d0d61a007b3e2d /lib/document-to-html.js | |
| parent | 83feedc21e7ba06625837d3c11461d9e8734bf6c (diff) | |
Operate over a more generic notion of note
Diffstat (limited to 'lib/document-to-html.js')
| -rw-r--r-- | lib/document-to-html.js | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js index fa1c63b..030df32 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -200,7 +200,7 @@ function DocumentConversion(options) { html.closeAll(); html.open(htmlPaths.element("ol")); var footnotes = footnoteIds.map(function(id) { - return document.footnotes.findFootnoteById(id); + return document.notes.findFootnoteById(id); }); convertElements(footnotes, html, messages, function(error) { if (error) { @@ -248,17 +248,17 @@ function DocumentConversion(options) { html.close(); callback(); }, - "footnote": function(element, html, messages, callback) { + "note": function(element, html, messages, callback) { var uid = footnoteUid(element.id); - html.open(htmlPaths.element("li", {id: "footnote-" + uid})); + html.open(htmlPaths.element("li", {id: element.noteType + "-" + uid})); var footnoteHtml = new HtmlGenerator(); convertElements(element.body, footnoteHtml, messages, function(err) { if (err) { callback(err); } else { footnoteHtml.text(" "); - footnoteHtml.open(htmlPaths.element("a", {href: "#footnote-ref-" + uid})); + footnoteHtml.open(htmlPaths.element("a", {href: "#" + element.noteType + "-ref-" + uid})); footnoteHtml.text("↑"); footnoteHtml.closeAll(); html.append(footnoteHtml); |
