mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-17 04:55:39 +00:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user