diff options
author | John MacFarlane <jgm@berkeley.edu> | 2016-11-30 15:34:58 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2016-11-30 15:34:58 +0100 |
commit | fb8a2540bdb91eee0ecf620b4e9d7acf3d78042f (patch) | |
tree | 448a3c909200e8bbd45ecaa65f2f85d88bcc66c6 /src/Text/Pandoc/Options.hs | |
parent | ac312caabd8c4e595e0b930154fd3033ba397ace (diff) |
Options: Removed writerStandalone, made writerTemplate a Maybe.
Previously setting writerStandalone = True did nothing unless
a template was provided in writerTemplate. Now a fragment
will be generated if writerTemplate is Nothing; otherwise,
the specified template will be used and standalone output
generated. [API change]
Diffstat (limited to 'src/Text/Pandoc/Options.hs')
-rw-r--r-- | src/Text/Pandoc/Options.hs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs index b02a5181f..48bc5f4eb 100644 --- a/src/Text/Pandoc/Options.hs +++ b/src/Text/Pandoc/Options.hs @@ -356,8 +356,7 @@ data ReferenceLocation = EndOfBlock -- ^ End of block -- | Options for writers data WriterOptions = WriterOptions - { writerStandalone :: Bool -- ^ Include header and footer - , writerTemplate :: String -- ^ Template to use in standalone mode + { writerTemplate :: Maybe String -- ^ Template to use , writerVariables :: [(String, String)] -- ^ Variables to set in template , writerTabStop :: Int -- ^ Tabstop for conversion btw spaces and tabs , writerTableOfContents :: Bool -- ^ Include table of contents @@ -405,8 +404,7 @@ data WriterOptions = WriterOptions } deriving (Show, Data, Typeable, Generic) instance Default WriterOptions where - def = WriterOptions { writerStandalone = False - , writerTemplate = "" + def = WriterOptions { writerTemplate = Nothing , writerVariables = [] , writerTabStop = 4 , writerTableOfContents = False |