@@ -211,10 +211,10 @@ writeDocx opts doc@(Pandoc meta _) = do
211 let doc' = stripInvalidChars . walk fixDisplayMath $ doc
211 let doc' = stripInvalidChars . walk fixDisplayMath $ doc
212 username <- lookup "USERNAME" <$> getEnvironment
212 username <- lookup "USERNAME" <$> getEnvironment
213 utctime <- getCurrentTime
213 utctime <- getCurrentTime
214− distArchive <- getDefaultReferenceDocx datadir
214+ distArchive <- getDefaultReferenceDocx Nothing
215 refArchive <- case writerReferenceDocx opts of
215 refArchive <- case writerReferenceDocx opts of
216 Just f -> liftM (toArchive . toLazy) $ B.readFile f
216 Just f -> liftM (toArchive . toLazy) $ B.readFile f
217− Nothing -> return distArchive
217+ Nothing -> getDefaultReferenceDocx datadir
219 parsedDoc <- parseXml refArchive distArchive "word/document.xml"
219 parsedDoc <- parseXml refArchive distArchive "word/document.xml"
220 let wname f qn = qPrefix qn == Just "w" && f (qName qn)
220 let wname f qn = qPrefix qn == Just "w" && f (qName qn)