aboutsummaryrefslogtreecommitdiff
path: root/lib/document-to-html.js
diff options
context:
space:
mode:
authorStoo Goff <stoo.goff@beatsystems.com>2015-01-30 15:49:22 +0000
committerMichael Williamson <mike@zwobble.org>2015-02-04 18:27:51 +0000
commitbfe6bd131845138fe09a97e7471c4b68ef42a763 (patch)
tree20c69194503ca5af2aa7650e3b4b06b07140864b /lib/document-to-html.js
parenta7657db08f295fa619090eb6fe3a925f3ba6fb06 (diff)
Added markdown-writer which will write directly from docx to Markdown.
Diffstat (limited to 'lib/document-to-html.js')
-rw-r--r--lib/document-to-html.js8
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);