From 554e939ed6f3ce697fca925a333cb9fc14ccbe5a Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Thu, 18 Apr 2013 20:07:23 +0100 Subject: Return Result from document-to-HTML conversion --- lib/document-to-html.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/document-to-html.js') diff --git a/lib/document-to-html.js b/lib/document-to-html.js index 64672ee..ef39da8 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -3,6 +3,7 @@ var async = require("async"); var htmlPaths = require("./html-paths"); var HtmlGenerator = require("./html-generator").HtmlGenerator; +var results = require("./results"); exports.DocumentConverter = DocumentConverter; @@ -20,9 +21,7 @@ function DocumentConverter(options) { return q.nfcall(elementToHtml, document, html).then(function() { html.closeAll(); - return { - html: html.asString() - }; + return new results.Result(html.asString(), []); }); } -- cgit v1.2.3