aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-08-16 17:08:33 +0100
committerMichael Williamson <mike@zwobble.org>2015-08-16 17:08:33 +0100
commit92d74192ae0c014b7b7d9d648f8305745433e4c2 (patch)
tree8d70994716d587ea549f313bf9c29151d5cbb2d4 /lib
parent42ea88fd99174ec0b86a71d5cd18244ea22dcadd (diff)
Add mammoth.readEmbeddedStyleMap
Diffstat (limited to 'lib')
-rw-r--r--lib/index.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/index.js b/lib/index.js
index a07b409..5613312 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -14,6 +14,7 @@ exports.images = require("./images");
exports.transforms = require("./transforms");
exports.underline = require("./underline");
exports.embedStyleMap = embedStyleMap;
+exports.readEmbeddedStyleMap = readEmbeddedStyleMap;
function convertToHtml(input, options) {
return convert(input, options);
@@ -46,7 +47,11 @@ function convert(input, options) {
return convertDocumentToHtml(documentResult, fullOptions);
});
});
-
+}
+
+function readEmbeddedStyleMap(input) {
+ return unzip.openZip(input)
+ .then(docxStyleMap.readStyleMap);
}
function convertDocumentToHtml(documentResult, options) {