diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-01 20:47:05 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-01 20:47:05 +0000 |
| commit | 4d26fc0b174beccd0129220de74fe0b44c6c7edf (patch) | |
| tree | 97633a4d0198e64c9ee9522825efcbef4d3a63a4 /mammoth/docx | |
| parent | b167af309185c04815c07271b7f8ed8db1d485db (diff) | |
Add support for w:ins
Diffstat (limited to 'mammoth/docx')
| -rw-r--r-- | mammoth/docx/document_xml.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mammoth/docx/document_xml.py b/mammoth/docx/document_xml.py index 8e8dda8..71d744c 100644 --- a/mammoth/docx/document_xml.py +++ b/mammoth/docx/document_xml.py @@ -91,6 +91,10 @@ def _create_reader(numbering): @handler("w:tab") def tab(element): return results.success(documents.tab()) + + @handler("w:ins") + def ins(element): + return _read_xml_elements(element.children) def read(element): handler = _handlers.get(element.name) @@ -106,7 +110,7 @@ def _create_reader(numbering): def _read_xml_elements(elements): return results.combine(map(read, elements)) \ - .map(lambda values: lists.filter(None, values)) + .map(lambda values: lists.collect(values)) return read |
