From c9f133942a541fbcae95720b5b0480b94e36c00f Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 1 Apr 2013 12:42:36 +0100 Subject: Convert document in the same way as other elements --- lib/documents.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/documents.js') 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); -- cgit v1.2.3