summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Docx.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-07-24 09:56:00 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-07-24 09:56:00 -0700
commit999edd960836ee6b43e7854f204b86f4cd845d06 (patch)
tree1eabddcc2dbefb7c0eabc6c77ca5008d3c2f0d68 /src/Text/Pandoc/Writers/Docx.hs
parentcd19d4596bc696670756c8ad6440d3f3b75cb5e8 (diff)
Changed signatures of writeODT, writeDocx, writeEPUB.
These now take WriterOptions and Pandoc only. The extra parameters for epub stylesheet, epub fonts, reference Docx, and reference ODT have been removed, since these things are now in WriterOptions. Note: breaking API change!
Diffstat (limited to 'src/Text/Pandoc/Writers/Docx.hs')
-rw-r--r--src/Text/Pandoc/Writers/Docx.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs
index 396e7a482..63329bb44 100644
--- a/src/Text/Pandoc/Writers/Docx.hs
+++ b/src/Text/Pandoc/Writers/Docx.hs
@@ -93,14 +93,13 @@ mknode s attrs =
add_attrs (map (\(k,v) -> Attr (unqual k) v) attrs) . node (unqual s)
-- | Produce an Docx file from a Pandoc document.
-writeDocx :: Maybe FilePath -- ^ Path specified by --reference-docx
- -> WriterOptions -- ^ Writer options
+writeDocx :: WriterOptions -- ^ Writer options
-> Pandoc -- ^ Document to convert
-> IO B.ByteString
-writeDocx mbRefDocx opts doc@(Pandoc (Meta tit auths date) _) = do
+writeDocx opts doc@(Pandoc (Meta tit auths date) _) = do
let datadir = writerUserDataDir opts
refArchive <- liftM toArchive $
- case mbRefDocx of
+ case writerReferenceDocx opts of
Just f -> B.readFile f
Nothing -> do
let defaultDocx = getDataFileName "reference.docx" >>= B.readFile