From a0ffb89a9c3abf5605f5497034d29f6286246b53 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sun, 6 Dec 2015 14:34:15 +0000 Subject: Ignore office-word:wrap --- NEWS | 2 +- mammoth/docx/__init__.py | 1 + mammoth/docx/body_xml.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index e1e78ae..6ed8c65 100644 --- a/NEWS +++ b/NEWS @@ -4,7 +4,7 @@ * Read children of v:roundrect. -* Ignore v:shadow and v:shapetype. +* Ignore office-word:wrap, v:shadow and v:shapetype. # 0.3.24 diff --git a/mammoth/docx/__init__.py b/mammoth/docx/__init__.py index c3701f2..af447b7 100644 --- a/mammoth/docx/__init__.py +++ b/mammoth/docx/__init__.py @@ -23,6 +23,7 @@ _namespaces = [ ("relationships", "http://schemas.openxmlformats.org/package/2006/relationships"), ("v", "urn:schemas-microsoft-com:vml"), ("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006"), + ("office-word", "urn:schemas-microsoft-com:office:word"), ] def read(fileobj): diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py index a627df9..42c79a2 100644 --- a/mammoth/docx/body_xml.py +++ b/mammoth/docx/body_xml.py @@ -42,6 +42,7 @@ class _BodyReader(object): def _create_reader(numbering, content_types, relationships, styles, docx_file, files): _ignored_elements = set([ + "office-word:wrap", "v:shadow", "v:shapetype", "w:bookmarkStart", -- cgit v1.2.3