diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-04-01 22:39:47 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-04-01 22:39:47 +0100 |
| commit | 89d074071d250a23264e9ab82bb896af3e5ce674 (patch) | |
| tree | abc9ec9b92d3366217abe568bd0985fe6aabe4d0 /lib/document-to-html.js | |
| parent | 720f997476ab2d0ac3cef17b890b423133ae5e7d (diff) | |
Fix image generation
Diffstat (limited to 'lib/document-to-html.js')
| -rw-r--r-- | lib/document-to-html.js | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/document-to-html.js b/lib/document-to-html.js index b9efe0d..916eb57 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -42,7 +42,7 @@ function DocumentConverter(options) { function convertParagraph(element, html) { html.style(styleForParagraph(element)); - convertElements(element.children, html); + return convertElements(element.children, html); } function styleForParagraph(element) { @@ -63,9 +63,11 @@ function DocumentConverter(options) { if (run.properties.isItalic) { runHtml.push(styles.element("em")); } - convertElements(run.children, runHtml); - runHtml.closeAll(); - html.append(runHtml); + return convertElements(run.children, runHtml) + .then(function() { + runHtml.closeAll(); + html.append(runHtml); + }); } var elementConverters = { |
