From 344cb23aa9fd61b6fc23397bd5566853bd914c5c Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 15 Aug 2020 12:33:39 +0100 Subject: Move soft hyphen support next to non-breaking hyphen support --- test/docx/body-reader.tests.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test') diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js index afdddfc..48f6b16 100644 --- a/test/docx/body-reader.tests.js +++ b/test/docx/body-reader.tests.js @@ -608,6 +608,12 @@ test("w:noBreakHyphen is read as non-breaking hyphen character", function() { assert.deepEqual(result.value, new documents.Text("\u2011")); }); +test("soft hyphens are read as text", function() { + var element = new XmlElement("w:softHyphen", {}, []); + var text = readXmlElementValue(element); + assert.deepEqual(text, new documents.Text("\u00AD")); +}); + test("w:tbl is read as document table element", function() { var tableXml = new XmlElement("w:tbl", {}, [ new XmlElement("w:tr", {}, [ @@ -1219,12 +1225,6 @@ test("text nodes are ignored when reading children", function() { assert.deepEqual(run, new documents.Run([])); }); -test("soft hyphens are read as text", function() { - var runXml = new XmlElement("w:softHyphen", {}, []); - var text = readXmlElementValue(runXml); - assert.deepEqual(text, new documents.Text("\u00AD")); -}); - function paragraphWithStyleId(styleId) { return new XmlElement("w:p", {}, [ new XmlElement("w:pPr", {}, [ -- cgit v1.2.3