aboutsummaryrefslogtreecommitdiff
path: root/mammoth/docx/document_xml.py
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2013-12-01 21:25:48 +0000
committerMichael Williamson <mike@zwobble.org>2013-12-01 21:25:48 +0000
commit4fd08468ad3823d09041a0ffa33aba2dd509e192 (patch)
treeb8420481e1307f6539c94c27c54b6f082bfb4900 /mammoth/docx/document_xml.py
parent9b479955a7c5b0547db8b274d2dfd6d0d6152194 (diff)
Add support for reading anchored images
Diffstat (limited to 'mammoth/docx/document_xml.py')
-rw-r--r--mammoth/docx/document_xml.py2
1 files changed, 2 insertions, 0 deletions
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") \