diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-12-10 10:39:44 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-01-25 17:07:41 +0100 |
commit | ce1664cf2ba29c8b973d7a228744b43144c0859d (patch) | |
tree | 650c44c6476d64326b568e16c6238b9f5e7e5de6 /src/Text/Pandoc/Writers | |
parent | 9570f59066c1e89500fcd8ab6ac6a401159ece27 (diff) | |
download | pandoc-ce1664cf2ba29c8b973d7a228744b43144c0859d.tar.gz |
Simplified reference-docx/reference-odt to reference-doc.
* Text.Pandoc.Options.WriterOptions: removed writerReferenceDocx
and writerReferenceODT, replaced them with writerReferenceDoc.
This can hold either an ODT or a Docx. In this way, writerReferenceDoc
is like writerTemplate, which can hold templates of different
formats. [API change]
* Removed `--reference-docx` and `--reference-odt` options.
* Added `--reference-doc` option.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Docx.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/ODT.hs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Docx.hs b/src/Text/Pandoc/Writers/Docx.hs index 0f040d19b..20320907e 100644 --- a/src/Text/Pandoc/Writers/Docx.hs +++ b/src/Text/Pandoc/Writers/Docx.hs @@ -225,7 +225,7 @@ writeDocx opts doc@(Pandoc meta _) = do username <- P.lookupEnv "USERNAME" utctime <- P.getCurrentTime distArchive <- P.getDefaultReferenceDocx datadir - refArchive <- case writerReferenceDocx opts of + refArchive <- case writerReferenceDoc opts of Just f -> toArchive <$> P.readFileLazy f Nothing -> P.getDefaultReferenceDocx datadir diff --git a/src/Text/Pandoc/Writers/ODT.hs b/src/Text/Pandoc/Writers/ODT.hs index b17b18a21..a1a1c4f62 100644 --- a/src/Text/Pandoc/Writers/ODT.hs +++ b/src/Text/Pandoc/Writers/ODT.hs @@ -77,7 +77,7 @@ pandocToODT opts doc@(Pandoc meta _) = do let datadir = writerUserDataDir opts let title = docTitle meta refArchive <- - case writerReferenceODT opts of + case writerReferenceDoc opts of Just f -> liftM toArchive $ lift $ P.readFileLazy f Nothing -> lift $ P.getDefaultReferenceODT datadir -- handle formulas and pictures |