diff options
Diffstat (limited to 'src/Text/Pandoc/Writers')
| -rw-r--r-- | src/Text/Pandoc/Writers/Docx.hs | 5 | ||||
| -rw-r--r-- | src/Text/Pandoc/Writers/ODT.hs | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 662b4d3bb..07aed0c9b 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -224,10 +224,11 @@ writeDocx opts doc@(Pandoc meta _) = do let doc' = walk fixDisplayMath $ doc username <- P.lookupEnv "USERNAME" utctime <- P.getCurrentTime - distArchive <- P.getDefaultReferenceDocx datadir + distArchive <- (toArchive . BL.fromStrict) <$> + P.readDataFile datadir "reference.docx" refArchive <- case writerReferenceDoc opts of Just f -> toArchive <$> P.readFileLazy f - Nothing -> P.getDefaultReferenceDocx datadir + Nothing -> return distArchive parsedDoc <- parseXml refArchive distArchive "word/document.xml" let wname f qn = qPrefix qn == Just "w" && f (qName qn) diff --git a/src/Text/Pandoc/Writers/ODT.hs b/src/Text/Pandoc/Writers/ODT.hs index a1a1c4f62..0e4999712 100644 --- a/src/Text/Pandoc/Writers/ODT.hs +++ b/src/Text/Pandoc/Writers/ODT.hs @@ -79,7 +79,8 @@ pandocToODT opts doc@(Pandoc meta _) = do refArchive <- case writerReferenceDoc opts of Just f -> liftM toArchive $ lift $ P.readFileLazy f - Nothing -> lift $ P.getDefaultReferenceODT datadir + Nothing -> lift $ (toArchive . B.fromStrict) <$> + P.readDataFile datadir "reference.odt" -- handle formulas and pictures -- picEntriesRef <- P.newIORef ([] :: [Entry]) doc' <- walkM (transformPicMath opts) $ walk fixDisplayMath doc |
