diff options
| -rw-r--r-- | mammoth/docx/body_xml.py | 1 | ||||
| -rw-r--r-- | tests/docx/body_xml_tests.py | 10 |
2 files changed, 10 insertions, 1 deletions
diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py index 76510ef..3495f66 100644 --- a/mammoth/docx/body_xml.py +++ b/mammoth/docx/body_xml.py @@ -420,6 +420,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f "v:shape": read_child_elements, "v:textbox": read_child_elements, "w:txbxContent": read_child_elements, + "w:object": read_child_elements, "w:pict": pict, "w:hyperlink": hyperlink, "w:bookmarkStart": bookmark_start, diff --git a/tests/docx/body_xml_tests.py b/tests/docx/body_xml_tests.py index 51d80e9..f0236fc 100644 --- a/tests/docx/body_xml_tests.py +++ b/tests/docx/body_xml_tests.py @@ -547,9 +547,17 @@ def children_of_w_ins_are_converted_normally(): ) @istest +def children_of_w_object_are_converted_normally(): + _assert_children_are_converted_normally("w:object") + +@istest def children_of_w_smart_tag_are_converted_normally(): + _assert_children_are_converted_normally("w:smartTag") + + +def _assert_children_are_converted_normally(tag_name): element = xml_element("w:p", {}, [ - xml_element("w:smartTag", {}, [ + xml_element(tag_name, {}, [ xml_element("w:r") ]) ]) |
