summaryrefslogtreecommitdiff
path: root/mammoth/transforms.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2025-06-08 00:22:01 +0100
committerMichael Williamson <mike@zwobble.org>2025-06-08 00:22:01 +0100
commit80e9fd089494996def1e2529d1fa127d3ee796dd (patch)
treeb54aa0b0959e5c83c43a78958669070e95e3fae8 /mammoth/transforms.py
parentcc1ad1d283264284e10beeff33b140abc16156d3 (diff)
Handle SDTs representing checkboxes wrapped in other elements
Diffstat (limited to 'mammoth/transforms.py')
-rw-r--r--mammoth/transforms.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mammoth/transforms.py b/mammoth/transforms.py
index 62bfc1f..cf96cd3 100644
--- a/mammoth/transforms.py
+++ b/mammoth/transforms.py
@@ -15,18 +15,18 @@ def element_of_type(element_type, transform):
return transform(element)
else:
return element
-
+
return _each_element(transform_element)
def _each_element(transform_element):
def transform_element_and_children(element):
- if isinstance(element, documents.HasChildren):
+ if isinstance(element, (documents.HasChildren, documents.TableCellUnmerged)):
children = list(map(transform_element_and_children, element.children))
element = element.copy(children=children)
-
+
return transform_element(element)
-
+
return transform_element_and_children