git.iko.soy/typeable/pandoc
on master help sign in
Make sure we use dist version of reference.docx for some things.

Taking some values from a user-supplied reference.docx tends to lead to corruption. This fixes a regression from the last release. Closes #2249.

commit36baded57288ba741d64ebcdfda4089bc729d604 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 28 Jun 2015, 23:25 (11 years ago) parent5f198c0
1 file changed+2−2
src/Text/Pandoc/Writers/Docx.hs+2−2
src/Text/Pandoc/Writers/Docx.hs+2−2
@@ -211,10 +211,10 @@ writeDocx opts doc@(Pandoc meta _) = do
211211 let doc' = stripInvalidChars . walk fixDisplayMath $ doc
212212 username <- lookup "USERNAME" <$> getEnvironment
213213 utctime <- getCurrentTime
214− distArchive <- getDefaultReferenceDocx datadir
214+ distArchive <- getDefaultReferenceDocx Nothing
215215 refArchive <- case writerReferenceDocx opts of
216216 Just f -> liftM (toArchive . toLazy) $ B.readFile f
217− Nothing -> return distArchive
217+ Nothing -> getDefaultReferenceDocx datadir
218218
219219 parsedDoc <- parseXml refArchive distArchive "word/document.xml"
220220 let wname f qn = qPrefix qn == Just "w" && f (qName qn)