diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-07-03 15:26:15 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-07-03 15:26:15 +0100 |
| commit | b249ef56971405e7b1d0b4bb3b9cfb4e779583ab (patch) | |
| tree | 26d26bed8596a52613ee90a2ac1f745e86ef6a64 /mammoth/docx/document_xml.py | |
| parent | 63974a9b4d026eed3b7a8b8c0ef2278ff28c4d18 (diff) | |
Wire up code for converting comments
Diffstat (limited to 'mammoth/docx/document_xml.py')
| -rw-r--r-- | mammoth/docx/document_xml.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/mammoth/docx/document_xml.py b/mammoth/docx/document_xml.py index 1c15001..e0d19a4 100644 --- a/mammoth/docx/document_xml.py +++ b/mammoth/docx/document_xml.py @@ -1,13 +1,21 @@ from .. import documents -def read_document_xml_element(element, +def read_document_xml_element( + element, body_reader, - notes=None): + notes=None, + comments=None): if notes is None: notes = [] + if comments is None: + comments = [] body_element = element.find_child("w:body") return body_reader.read_all(body_element.children) \ - .map(lambda children: documents.document(children, documents.notes(notes))) + .map(lambda children: documents.document( + children, + notes=documents.notes(notes), + comments=comments + )) |
