diff options
| author | Michael Williamson <mike@zwobble.org> | 2014-06-08 22:22:54 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2014-06-08 22:22:54 +0100 |
| commit | 3ddcb6b5aa1a4502ff60fecc0e38041efa41a20e (patch) | |
| tree | a27964927b79b8964af274e864b3400f4a336482 /tests | |
| parent | aac54dca5f6b96788ae9c045cb64534ab7b598ad (diff) | |
Ignore styles that aren't paragraph or character
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/docx/styles-reader.tests.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/docx/styles-reader.tests.js b/tests/docx/styles-reader.tests.js index 6dfdcd2..2c07913 100644 --- a/tests/docx/styles-reader.tests.js +++ b/tests/docx/styles-reader.tests.js @@ -44,6 +44,15 @@ describe('readStylesXml', function() { assert.equal(styles.findParagraphStyleById("Heading1Char"), null); }); + test('character and table styles are distinct', function() { + var styles = readStylesXml({ + root: new XmlElement("w:styles", {}, [ + styleElement("table", "Heading1", "Heading 1"), + ]) + }); + assert.equal(styles.findCharacterStyleById("Heading1"), null); + }); + test('styles include names', function() { var styles = readStylesXml({ root: new XmlElement("w:styles", {}, [ |
