From 3ddcb6b5aa1a4502ff60fecc0e38041efa41a20e Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 8 Jun 2014 22:22:54 +0100 Subject: Ignore styles that aren't paragraph or character --- tests/docx/styles-reader.tests.js | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests') 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", {}, [ -- cgit v1.2.3