aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-07-14 21:46:48 +0100
committerMichael Williamson <mike@zwobble.org>2017-07-14 21:46:48 +0100
commitcdac278f600e57c6401d72c03209743d87aa3108 (patch)
tree933ade8d8c75c6ed5ee95e28d7e0571bd0447991
parent8664b0fcd1ada454b5bde7cb67593a8789997bb9 (diff)
Read children of v:group elements
-rw-r--r--NEWS4
-rw-r--r--lib/docx/body-reader.js3
-rw-r--r--test/docx/body-reader.tests.js4
3 files changed, 10 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index c32218e..7dbafff 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+# 1.4.2
+
+* Read children of v:group elements.
+
# 1.4.1
* Read w:noBreakHyphen elements as non-breaking hyphen characters.
diff --git a/lib/docx/body-reader.js b/lib/docx/body-reader.js
index 742e362..6f6ebe2 100644
--- a/lib/docx/body-reader.js
+++ b/lib/docx/body-reader.js
@@ -281,7 +281,8 @@ function BodyReader(options) {
"w:txbxContent": readChildElements,
"wp:inline": readDrawingElement,
"wp:anchor": readDrawingElement,
- "v:imagedata": readImageData
+ "v:imagedata": readImageData,
+ "v:group": readChildElements
};
return {
diff --git a/test/docx/body-reader.tests.js b/test/docx/body-reader.tests.js
index 8aa6836..5257530 100644
--- a/test/docx/body-reader.tests.js
+++ b/test/docx/body-reader.tests.js
@@ -898,6 +898,10 @@ test("children of w:smartTag are converted normally", function() {
assertChildrenAreConvertedNormally("w:smartTag");
});
+test("children of v:group are converted normally", function() {
+ assertChildrenAreConvertedNormally("v:group");
+});
+
function assertChildrenAreConvertedNormally(tagName) {
var runXml = new XmlElement("w:r", {}, []);
var result = readXmlElement(new XmlElement(tagName, {}, [runXml]));