From 58cae6030e51481ffb462e52ab6aeb479e0a705d Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 19 Jan 2015 22:48:32 +0000 Subject: Operate over a more generic notion of note --- lib/document-to-html.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/document-to-html.js') 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); -- cgit v1.2.3