aboutsummaryrefslogtreecommitdiff
path: root/mammoth/transforms.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2017-04-12 23:16:05 +0100
committerMichael Williamson <mike@zwobble.org>2017-04-12 23:16:05 +0100
commit826a73a06ded47ee70d9d6c7da2ad394c447a9f9 (patch)
tree21cb0bccd563835d03a6d5e861a2565c9b28fdd1 /mammoth/transforms.py
parent438d88240b5bfa99494562fc39817967fbfbb2f0 (diff)
Fix recursion in transforms
Diffstat (limited to 'mammoth/transforms.py')
-rw-r--r--mammoth/transforms.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mammoth/transforms.py b/mammoth/transforms.py
index d126578..649b4db 100644
--- a/mammoth/transforms.py
+++ b/mammoth/transforms.py
@@ -18,7 +18,7 @@ def element_of_type(element_type, transform):
def _each_element(transform_element):
def transform_element_and_children(element):
if isinstance(element, documents.HasChildren):
- children = list(map(transform_element, element.children))
+ children = list(map(transform_element_and_children, element.children))
element = element.copy(children=children)
return transform_element(element)