diff options
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 b012ea9..695b34c 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -43,7 +43,7 @@ function DocumentConversion(options) { function convertToHtml(document) { var messages = []; - var html = new HtmlGenerator({prettyPrint: options.prettyPrint}); + var html = new HtmlGenerator({prettyPrint: options.prettyPrint, markdown: options.markdown}); return promises.nfcall(elementToHtml, document, html, messages).then(function() { html.closeAll(); @@ -88,7 +88,7 @@ function DocumentConversion(options) { } function convertRun(run, html, messages, callback) { - var runHtml = new HtmlGenerator(); + var runHtml = new HtmlGenerator({ markdown: options.markdown }); if (run.styleId) { var style = findStyle(run); if (style) { @@ -160,7 +160,7 @@ function DocumentConversion(options) { html.open(htmlPaths.element("td"), {alwaysWrite: true}); async.map(element.children, function(child, callback) { - var cellHtml = new HtmlGenerator(); + var cellHtml = new HtmlGenerator({ markdown: options.markdown }); elementToHtml(child, cellHtml, messages, function(error) { if (error) { callback(error); @@ -251,7 +251,7 @@ function DocumentConversion(options) { }, "note": function(element, html, messages, callback) { html.open(htmlPaths.element("li", {id: noteHtmlId(element)})); - var footnoteHtml = new HtmlGenerator(); + var footnoteHtml = new HtmlGenerator({ markdown: options.markdown }); convertElements(element.body, footnoteHtml, messages, function(err) { if (err) { callback(err); |
