From 4fd08468ad3823d09041a0ffa33aba2dd509e192 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 1 Dec 2013 21:25:48 +0000 Subject: Add support for reading anchored images --- mammoth/docx/document_xml.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mammoth') diff --git a/mammoth/docx/document_xml.py b/mammoth/docx/document_xml.py index f8f1656..9c895d4 100644 --- a/mammoth/docx/document_xml.py +++ b/mammoth/docx/document_xml.py @@ -29,6 +29,7 @@ def _create_reader(numbering, content_types, relationships, docx_file): def handler(name): def add(func): _handlers[name] = func + return func return add @@ -106,6 +107,7 @@ def _create_reader(numbering, content_types, relationships, docx_file): return _read_xml_elements(element.children) @handler("wp:inline") + @handler("wp:anchor") def inline(element): alt_text = element.find_child_or_null("wp:docPr").attributes.get("descr") blips = element.find_children("a:graphic") \ -- cgit v1.2.3