aboutsummaryrefslogtreecommitdiff
path: root/mammoth/docx
diff options
context:
space:
mode:
Diffstat (limited to 'mammoth/docx')
-rw-r--r--mammoth/docx/body_xml.py2
-rw-r--r--mammoth/docx/uris.py5
2 files changed, 6 insertions, 1 deletions
diff --git a/mammoth/docx/body_xml.py b/mammoth/docx/body_xml.py
index 433d5a2..6c2c501 100644
--- a/mammoth/docx/body_xml.py
+++ b/mammoth/docx/body_xml.py
@@ -3,9 +3,9 @@ import contextlib
from .. import documents
from .. import results
from .. import lists
-from ..zips import uri_to_zip_entry_name
from .xmlparser import node_types, XmlElement
from .styles_xml import Styles
+from .uris import uri_to_zip_entry_name
def reader(numbering=None,
diff --git a/mammoth/docx/uris.py b/mammoth/docx/uris.py
new file mode 100644
index 0000000..59f3ffe
--- /dev/null
+++ b/mammoth/docx/uris.py
@@ -0,0 +1,5 @@
+def uri_to_zip_entry_name(base, uri):
+ if uri.startswith("/"):
+ return uri[1:]
+ else:
+ return base + "/" + uri