aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2014-04-27 18:12:33 +0100
committerMichael Williamson <mike@zwobble.org>2014-04-27 18:12:33 +0100
commit9b9fc902b784090f4f6fafd866c7b35bf47f517f (patch)
tree7aee5aad173e8e7b42d344aa748d709d4e4dbf3a /lib
parenta8b849523b1ef72810309068835aa123573f9dd0 (diff)
Throw error if somebody tries to use styleMapping()
Diffstat (limited to 'lib')
-rw-r--r--lib/index.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/index.js b/lib/index.js
index baae852..35bcbaf 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -25,3 +25,7 @@ function convertDocumentToHtml(documentResult, options) {
return documentConverter.convertToHtml(document);
});
}
+
+exports.styleMapping = function() {
+ throw new Error('Use a raw string instead of mammoth.styleMapping e.g. "p[style-naming=\'Title\'] => h1" instead of mammoth.styleMapping("p[style-naming=\'Title\'] => h1")');
+};