aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-08-10 23:29:25 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-08-10 23:37:44 -0700
commit737d09e325a65ad37f97b03371d1999c0360dea0 (patch)
tree036ac6cf717859ad757af80437746d4d673b40c7 /src/Text/Pandoc/Writers
parent13abd97ac0dad1162a6779775207a3db06418ce9 (diff)
downloadpandoc-737d09e325a65ad37f97b03371d1999c0360dea0.tar.gz
Removed datadir param from readDataFile and getDefaultTemplate.
In Text.Pandoc.Class and Text.Pandoc.Template, resp. We now get the datadir from CommonState.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs2
-rw-r--r--src/Text/Pandoc/Writers/EPUB.hs3
-rw-r--r--src/Text/Pandoc/Writers/ODT.hs3
3 files changed, 3 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index a60056845..f20edbfaa 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -235,7 +235,7 @@ writeDocx opts doc@(Pandoc meta _) = do
refArchive <- case writerReferenceDoc opts of
Just f -> toArchive <$> P.readFileLazy f
Nothing -> (toArchive . BL.fromStrict) <$>
- P.readDataFile datadir "reference.docx"
+ P.readDataFile "reference.docx"
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/EPUB.hs b/src/Text/Pandoc/Writers/EPUB.hs
index b04a7de51..04126fbb7 100644
--- a/src/Text/Pandoc/Writers/EPUB.hs
+++ b/src/Text/Pandoc/Writers/EPUB.hs
@@ -393,8 +393,7 @@ pandocToEPUB version opts doc@(Pandoc meta _) = do
-- stylesheet
stylesheets <- case epubStylesheets metadata of
[] -> (\x -> [B.fromChunks [x]]) <$>
- P.readDataFile (writerUserDataDir opts)
- "epub.css"
+ P.readDataFile "epub.css"
fs -> mapM P.readFileLazy fs
let stylesheetEntries = zipWith
(\bs n -> mkEntry ("styles/stylesheet" ++ show n ++ ".css") bs)
diff --git a/src/Text/Pandoc/Writers/ODT.hs b/src/Text/Pandoc/Writers/ODT.hs
index 785891a9f..160141822 100644
--- a/src/Text/Pandoc/Writers/ODT.hs
+++ b/src/Text/Pandoc/Writers/ODT.hs
@@ -78,14 +78,13 @@ pandocToODT :: PandocMonad m
-> Pandoc -- ^ Document to convert
-> O m B.ByteString
pandocToODT opts doc@(Pandoc meta _) = do
- let datadir = writerUserDataDir opts
let title = docTitle meta
lang <- toLang (getLang opts meta)
refArchive <-
case writerReferenceDoc opts of
Just f -> liftM toArchive $ lift $ P.readFileLazy f
Nothing -> lift $ (toArchive . B.fromStrict) <$>
- P.readDataFile datadir "reference.odt"
+ P.readDataFile "reference.odt"
-- handle formulas and pictures
-- picEntriesRef <- P.newIORef ([] :: [Entry])
doc' <- walkM (transformPicMath opts) $ walk fixDisplayMath doc