aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Docx/Parse.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Docx/Parse.hs b/src/Text/Pandoc/Readers/Docx/Parse.hs
index 3c4791e1a..16bd487f4 100644
--- a/src/Text/Pandoc/Readers/Docx/Parse.hs
+++ b/src/Text/Pandoc/Readers/Docx/Parse.hs
@@ -381,7 +381,12 @@ getDocumentXmlPath zf = do
filter (\e -> findAttr (QName "Type" Nothing Nothing) e ==
Just "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument")
rels
- findAttr (QName "Target" Nothing Nothing) rel
+ fp <- findAttr (QName "Target" Nothing Nothing) rel
+ -- sometimes there will be a leading slash, which windows seems to
+ -- have trouble with.
+ return $ case fp of
+ '/' : fp' -> fp'
+ _ -> fp
archiveToDocument :: Archive -> D Document
archiveToDocument zf = do