aboutsummaryrefslogtreecommitdiff
path: root/mammoth
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2025-06-08 14:11:10 +0100
committerMichael Williamson <mike@zwobble.org>2025-06-08 14:11:10 +0100
commitbd2cf5a02ec9bf0e6ff877e3a962b236b4143f34 (patch)
treeedb68889cd3ed190156f19620c99a34c8b29d8d3 /mammoth
parent80e9fd089494996def1e2529d1fa127d3ee796dd (diff)
Ignore deleted table row
Diffstat (limited to 'mammoth')
-rw-r--r--mammoth/docx/body_xml.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py
index 5cef312..f99a799 100644
--- a/mammoth/docx/body_xml.py
+++ b/mammoth/docx/body_xml.py
@@ -351,6 +351,12 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f
def table_row(element):
properties = element.find_child_or_null("w:trPr")
+
+ # See 17.13.5.12 del (Deleted Table Row) of ECMA-376 4th edition Part 1
+ is_deleted = bool(properties.find_child("w:del"))
+ if is_deleted:
+ return _empty_result
+
is_header = bool(properties.find_child("w:tblHeader"))
return _read_xml_elements(element.children) \
.map(lambda children: documents.table_row(