aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-07-14 21:55:37 +0100
committerMichael Williamson <mike@zwobble.org>2017-07-14 21:55:37 +0100
commit16bf9f6bfcb9684412e769fe7dad7092f9d97347 (patch)
treef497733c6aeb1c2636456c907cbed5061fac2a63
parent7849db208069eb09604be6f2e9603270647fde17 (diff)
Read children of v:group elements
-rw-r--r--NEWS4
-rw-r--r--mammoth/docx/body_xml.py1
-rw-r--r--tests/docx/body_xml_tests.py5
3 files changed, 10 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 12dc364..f6605ef 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/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py
index db3da4e..312e9de 100644
--- a/mammoth/docx/body_xml.py
+++ b/mammoth/docx/body_xml.py
@@ -448,6 +448,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f
"w:object": read_child_elements,
"w:smartTag": read_child_elements,
"w:drawing": read_child_elements,
+ "v:group": read_child_elements,
"v:roundrect": read_child_elements,
"v:shape": read_child_elements,
"v:textbox": read_child_elements,
diff --git a/tests/docx/body_xml_tests.py b/tests/docx/body_xml_tests.py
index a701978..bde96e6 100644
--- a/tests/docx/body_xml_tests.py
+++ b/tests/docx/body_xml_tests.py
@@ -616,6 +616,11 @@ def children_of_w_smart_tag_are_converted_normally():
_assert_children_are_converted_normally("w:smartTag")
+@istest
+def children_of_v_group_are_converted_normally():
+ _assert_children_are_converted_normally("v:group")
+
+
def _assert_children_are_converted_normally(tag_name):
element = xml_element("w:p", {}, [
xml_element(tag_name, {}, [