diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-10-08 23:47:19 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-10-09 11:01:33 -0700 |
commit | 3aa069e1d5853966964471e36b0099ddba0489fd (patch) | |
tree | 4001a2798ecb6c0698355f8c6fd2f17c4238d8ab /src/Text/Pandoc/App/Opt.hs | |
parent | aceee9ca48484c300ac3519fb7991e3d22768312 (diff) | |
download | pandoc-3aa069e1d5853966964471e36b0099ddba0489fd.tar.gz |
Change optVariables from [(String, String)] to Context Text.
In Text.Pandoc.App.Opt [API change].
Diffstat (limited to 'src/Text/Pandoc/App/Opt.hs')
-rw-r--r-- | src/Text/Pandoc/App/Opt.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs index 123c860fd..5fbbbc525 100644 --- a/src/Text/Pandoc/App/Opt.hs +++ b/src/Text/Pandoc/App/Opt.hs @@ -31,6 +31,8 @@ import Text.Pandoc.Options (TopLevelDivision (TopLevelDefault), ObfuscationMethod (NoObfuscation), CiteMethod (Citeproc)) import Text.Pandoc.Shared (camelCaseToHyphenated) +import Text.DocTemplates (Context(..)) +import Data.Text (Text) import Data.Aeson (defaultOptions, Options(..)) import Data.Aeson.TH (deriveJSON) @@ -47,7 +49,7 @@ data Opt = Opt , optTableOfContents :: Bool -- ^ Include table of contents , optShiftHeadingLevelBy :: Int -- ^ Shift heading level by , optTemplate :: Maybe FilePath -- ^ Custom template - , optVariables :: [(String,String)] -- ^ Template variables to set + , optVariables :: Context Text -- ^ Template variables to set , optMetadata :: [(String, String)] -- ^ Metadata fields to set , optMetadataFile :: [FilePath] -- ^ Name of YAML metadata file , optOutputFile :: Maybe FilePath -- ^ Name of output file @@ -121,7 +123,7 @@ defaultOpts = Opt , optTableOfContents = False , optShiftHeadingLevelBy = 0 , optTemplate = Nothing - , optVariables = [] + , optVariables = mempty , optMetadata = [] , optMetadataFile = [] , optOutputFile = Nothing |