diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-06-28 23:25:55 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-06-28 23:25:55 -0700 |
commit | 36baded57288ba741d64ebcdfda4089bc729d604 (patch) | |
tree | f1dda7930c86616ae438aea779b8bbe2f3408fc2 /src/Text/Pandoc/Writers | |
parent | 5f198c019b2f9b87b5b4838121f3539924f04695 (diff) | |
download | pandoc-36baded57288ba741d64ebcdfda4089bc729d604.tar.gz |
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.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Docx.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 8ffae5048..da4c78cef 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -211,10 +211,10 @@ writeDocx opts doc@(Pandoc meta _) = do let doc' = stripInvalidChars . walk fixDisplayMath $ doc username <- lookup "USERNAME" <$> getEnvironment utctime <- getCurrentTime - distArchive <- getDefaultReferenceDocx datadir + distArchive <- getDefaultReferenceDocx Nothing refArchive <- case writerReferenceDocx opts of Just f -> liftM (toArchive . toLazy) $ B.readFile f - Nothing -> return distArchive + Nothing -> getDefaultReferenceDocx datadir parsedDoc <- parseXml refArchive distArchive "word/document.xml" let wname f qn = qPrefix qn == Just "w" && f (qName qn) |