From 56589f6390459cb7a4aedd1f7e5ce0a518b0f3c7 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 9 Apr 2014 12:05:05 +0100 Subject: Revert "Add prettyPrint option" This reverts commit 06cc13300efe79b591690b577a8b2094317ee551. --- lib/document-to-html.js | 8 ++------ tests/mammoth.tests.js | 7 ------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/lib/document-to-html.js b/lib/document-to-html.js index 1cbde9f..ddb8848 100644 --- a/lib/document-to-html.js +++ b/lib/document-to-html.js @@ -1,6 +1,5 @@ var promises = require("./promises"); var async = require("async"); -var beautifyHtml = require("js-beautify/js/lib/beautify-html") var htmlPaths = require("./html-paths"); var HtmlGenerator = require("./html-generator").HtmlGenerator; @@ -29,11 +28,8 @@ function DocumentConverter(options) { return promises.nfcall(elementToHtml, document, html, messages).then(function() { html.closeAll(); - var htmlString = html.asString(); - if (options.prettyPrint) { - htmlString = beautifyHtml.html_beautify(htmlString, {indent_size: 2}); - } - return new results.Result(htmlString, messages); + + return new results.Result(html.asString(), messages); }); } diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js index a59ade5..564eb8c 100644 --- a/tests/mammoth.tests.js +++ b/tests/mammoth.tests.js @@ -87,11 +87,4 @@ describe('mammoth', function() { assert.equal(result.value, ''); }); }); - - test('newlines and indentation are used if prettyPrint is true', function() { - var docxPath = path.join(__dirname, "test-data/simple-list.docx"); - return mammoth.convertToHtml({path: docxPath}, {prettyPrint: true}).then(function(result) { - assert.equal(result.value, ''); - }); - }); }) -- cgit v1.2.3