From 3ea79e23d3211b937c2c75f1390b212b25cc2fcb Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 15 Jun 2015 14:22:26 +0100 Subject: Read mc:Fallback when reading mc:AlternateContent --- mammoth/docx/document_xml.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mammoth') diff --git a/mammoth/docx/document_xml.py b/mammoth/docx/document_xml.py index 9477ab5..70e25a5 100644 --- a/mammoth/docx/document_xml.py +++ b/mammoth/docx/document_xml.py @@ -248,6 +248,10 @@ def _create_reader(numbering, content_types, relationships, styles, note_element note_reference_reader("footnote") note_reference_reader("endnote") + @handler("mc:AlternateContent") + def alternate_content(element): + return read_child_elements(element.find_child("mc:Fallback")) + def read(element): handler = _handlers.get(element.name) if handler is None: -- cgit v1.2.3