aboutsummaryrefslogtreecommitdiff
path: root/lib/document-to-html.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-04-01 22:39:47 +0100
committerMichael Williamson <mike@zwobble.org>2013-04-01 22:39:47 +0100
commit89d074071d250a23264e9ab82bb896af3e5ce674 (patch)
treeabc9ec9b92d3366217abe568bd0985fe6aabe4d0 /lib/document-to-html.js
parent720f997476ab2d0ac3cef17b890b423133ae5e7d (diff)
Fix image generation
Diffstat (limited to 'lib/document-to-html.js')
-rw-r--r--lib/document-to-html.js10
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 = {