diff options
| author | Michael Williamson <mike@zwobble.org> | 2025-06-08 00:22:01 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2025-06-08 00:22:01 +0100 |
| commit | 80e9fd089494996def1e2529d1fa127d3ee796dd (patch) | |
| tree | b54aa0b0959e5c83c43a78958669070e95e3fae8 /mammoth/transforms.py | |
| parent | cc1ad1d283264284e10beeff33b140abc16156d3 (diff) | |
Handle SDTs representing checkboxes wrapped in other elements
Diffstat (limited to 'mammoth/transforms.py')
| -rw-r--r-- | mammoth/transforms.py | 8 |
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 |
