aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/documents.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/documents.js b/lib/documents.js
index cee1b48..eebd607 100644
--- a/lib/documents.js
+++ b/lib/documents.js
@@ -18,7 +18,7 @@ function DocumentConverter(options) {
function convertToHtml(document) {
var html = new HtmlGenerator();
- convertElements(document.children, html);
+ elementToHtml(document, html);
return q.when({
html: html.asString()
@@ -48,6 +48,9 @@ function DocumentConverter(options) {
}
var elementConverters = {
+ "document": function(document, html) {
+ convertElements(document.children, html);
+ },
"paragraph": convertParagraph,
"run": function(element, html) {
convertElements(element.children, html);