From b249ef56971405e7b1d0b4bb3b9cfb4e779583ab Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 3 Jul 2016 15:26:15 +0100 Subject: Wire up code for converting comments --- mammoth/docx/document_xml.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'mammoth/docx/document_xml.py') 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 + )) -- cgit v1.2.3