From e23fe00ff2a8fb3c796bfcc600dcc58dba902fa5 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 23 Jan 2017 20:39:05 +0000 Subject: Move target URI handling out of zips module --- mammoth/docx/uris.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 mammoth/docx/uris.py (limited to 'mammoth/docx/uris.py') 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 -- cgit v1.2.3