diff options
| -rw-r--r-- | NEWS | 4 | ||||
| -rw-r--r-- | mammoth/docx/body_xml.py | 1 | ||||
| -rw-r--r-- | tests/docx/body_xml_tests.py | 3 |
3 files changed, 8 insertions, 0 deletions
@@ -1,3 +1,7 @@ +# 1.13.0 + +* Read the children of w:customXml elements. + # 1.12.2 * Avoid excessive backtracking when parsing an unterminated string with many diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py index 7ecf43b..bf3e3ca 100644 --- a/mammoth/docx/body_xml.py +++ b/mammoth/docx/body_xml.py @@ -696,6 +696,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f "w:tbl": table, "w:tr": table_row, "w:tc": table_cell, + "w:customXml": read_child_elements, "w:ins": read_child_elements, "w:object": read_child_elements, "w:smartTag": read_child_elements, diff --git a/tests/docx/body_xml_tests.py b/tests/docx/body_xml_tests.py index 963d3c4..1bce6e1 100644 --- a/tests/docx/body_xml_tests.py +++ b/tests/docx/body_xml_tests.py @@ -1286,6 +1286,9 @@ class TableTests(object): assert_equal([expected_warning], result.messages) +def test_children_of_w_custom_xml_are_converted_normally(): + _assert_children_are_converted_normally("w:customXml") + def test_children_of_w_ins_are_converted_normally(): _assert_children_are_converted_normally("w:ins") |
