diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-04-01 13:01:33 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-04-01 13:01:33 +0100 |
| commit | 5c7aa27a92265e0890f3b970ca8102751e0d7e01 (patch) | |
| tree | b427f4571c157b9b51acce59674d6b09d4119d0a /tests/documents.tests.js | |
| parent | ed1473a31a6294617bf239cc1fd15272fd7c9946 (diff) | |
Add mapping for run styles
Diffstat (limited to 'tests/documents.tests.js')
| -rw-r--r-- | tests/documents.tests.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/documents.tests.js b/tests/documents.tests.js index df10a92..d08500d 100644 --- a/tests/documents.tests.js +++ b/tests/documents.tests.js @@ -119,6 +119,18 @@ describe('DocumentConverter', function() { assert.equal(result.html, "<strong><em>Hello.</em></strong>"); }); }); + + test('run styles are converted to HTML if mapping exists', function() { + var run = runOfText("Hello.", {styleName: "Emphasis"}); + var converter = new DocumentConverter({ + runStyleMap: { + "Emphasis": styles.elements(["strong"]) + } + }); + return converter.convertToHtml(run).then(function(result) { + assert.equal(result.html, "<strong>Hello.</strong>"); + }); + }); }); function paragraphOfText(text, styleName) { |
