From 402859fc750a2aa3d84b5e2e4553996e76a50a15 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 2 Apr 2018 09:58:45 +0100 Subject: Read the children of v:rect elements --- NEWS | 4 ++++ mammoth/docx/body_xml.py | 1 + tests/docx/body_xml_tests.py | 5 +++++ 3 files changed, 10 insertions(+) diff --git a/NEWS b/NEWS index 63522b1..10ac5ff 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +# 1.4.5 + +* Read the children of v:rect elements. + # 1.4.4 * Parse paragraph indents. diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py index cdba409..d6ca993 100644 --- a/mammoth/docx/body_xml.py +++ b/mammoth/docx/body_xml.py @@ -475,6 +475,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f "w:smartTag": read_child_elements, "w:drawing": read_child_elements, "v:group": read_child_elements, + "v:rect": 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 537f123..b259d59 100644 --- a/tests/docx/body_xml_tests.py +++ b/tests/docx/body_xml_tests.py @@ -722,6 +722,11 @@ def children_of_v_group_are_converted_normally(): _assert_children_are_converted_normally("v:group") +@istest +def children_of_v_rect_are_converted_normally(): + _assert_children_are_converted_normally("v:rect") + + def _assert_children_are_converted_normally(tag_name): element = xml_element("w:p", {}, [ xml_element(tag_name, {}, [ -- cgit v1.2.3