aboutsummaryrefslogtreecommitdiff
path: root/tests/mammoth.tests.js
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-06-17 14:33:43 +0100
committerMichael Williamson <mike@zwobble.org>2015-06-17 14:33:43 +0100
commit17577bdd715c65e71d81f762b54b8c27f60f4535 (patch)
tree5389d7741881b2d198daf450f915fa9b3527f7e7 /tests/mammoth.tests.js
parentdc31bacddd43e100a2793c76e26d35568262d89a (diff)
Support underlines in style map
Diffstat (limited to 'tests/mammoth.tests.js')
-rw-r--r--tests/mammoth.tests.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js
index e016fe1..93fc966 100644
--- a/tests/mammoth.tests.js
+++ b/tests/mammoth.tests.js
@@ -217,6 +217,13 @@ describe('mammoth', function() {
});
});
+ test('underline can be configured with style mapping', function() {
+ var docxPath = path.join(__dirname, "test-data/underline.docx");
+ return mammoth.convertToHtml({path: docxPath}, {styleMap: "u => em"}).then(function(result) {
+ assert.equal(result.value, '<p><strong>The </strong><strong><em>Sunset</em></strong><strong> Tree</strong></p>');
+ });
+ });
+
test('indentation is used if prettyPrint is true', function() {
var docxPath = path.join(__dirname, "test-data/single-paragraph.docx");
return mammoth.convertToHtml({path: docxPath}, {prettyPrint: true}).then(function(result) {