diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-07-03 12:31:50 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-07-03 12:31:50 +0100 |
| commit | 8dce33362f5338953ed2a614e736c197e36b9984 (patch) | |
| tree | f7ab236ec7ed95f937e5d0b1125dcf4b8e1ff43c /mammoth/docx | |
| parent | f2db2bcf40c2c497a33b1f087b67111c3351a406 (diff) | |
Read comment references
Diffstat (limited to 'mammoth/docx')
| -rw-r--r-- | mammoth/docx/body_xml.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py index c493c4b..fe75f7c 100644 --- a/mammoth/docx/body_xml.py +++ b/mammoth/docx/body_xml.py @@ -334,6 +334,9 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f return note_reference + def read_comment_reference(element): + return _success(documents.comment_reference(element.attributes["w:id"])) + def alternate_content(element): return read_child_elements(element.find_child("mc:Fallback")) @@ -364,6 +367,7 @@ def _create_reader(numbering, content_types, relationships, styles, docx_file, f "v:imagedata": read_imagedata, "w:footnoteReference": note_reference_reader("footnote"), "w:endnoteReference": note_reference_reader("endnote"), + "w:commentReference": read_comment_reference, "mc:AlternateContent": alternate_content, "w:sdt": read_sdt } |
