aboutsummaryrefslogtreecommitdiff
path: root/mammoth/docx/document_xml.py
diff options
context:
space:
mode:
Diffstat (limited to 'mammoth/docx/document_xml.py')
-rw-r--r--mammoth/docx/document_xml.py14
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
+ ))