aboutsummaryrefslogtreecommitdiff
path: root/lib/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/index.js')
-rw-r--r--lib/index.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/index.js b/lib/index.js
index 4c35f31..65ec467 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -1,4 +1,5 @@
var docxReader = require("./docx-reader");
+var HeuristicsProcessor = require("./heuristics-processor").HeuristicsProcessor;
var DocumentConverter = require("./document-to-html").DocumentConverter;
var htmlPaths = require("./html-paths");
var documentMatchers = require("./document-matchers");
@@ -38,6 +39,9 @@ Converter.prototype.convertToHtml = function(inputOptions) {
var options = this._options;
return read(inputOptions)
.then(function(documentResult) {
+ return processHeuristics(documentResult);
+ })
+ .then(function(documentResult) {
return convertDocumentToHtml(documentResult, options);
});
}
@@ -51,6 +55,11 @@ function read(inputOptions) {
return docxReader.read(inputOptions);
}
+function processHeuristics(documentResult) {
+ var heuristicsProcessor = new HeuristicsProcessor();
+ return heuristicsProcessor.processHeuristics(documentResult);
+}
+
function convertDocumentToHtml(documentResult, options) {
var documentConverter = new DocumentConverter(options);
return documentResult.flatMapThen(function(document) {