From 826a73a06ded47ee70d9d6c7da2ad394c447a9f9 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 12 Apr 2017 23:16:05 +0100 Subject: Fix recursion in transforms --- mammoth/transforms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mammoth/transforms.py') 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) -- cgit v1.2.3