diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-10-08 09:22:46 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-10-09 11:01:33 -0700 |
commit | aceee9ca48484c300ac3519fb7991e3d22768312 (patch) | |
tree | 5beaccc4860fd5a9525514d2fe9e737e42703f73 /src/Text/Pandoc/App | |
parent | 1b10b5cea947cd6567c33466006c4216fde9f107 (diff) | |
download | pandoc-aceee9ca48484c300ac3519fb7991e3d22768312.tar.gz |
Options.WriterOptions: Change type of writerVariables to Context Text.
This will allow structured values.
[API change]
Diffstat (limited to 'src/Text/Pandoc/App')
-rw-r--r-- | src/Text/Pandoc/App/OutputSettings.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Text/Pandoc/App/OutputSettings.hs b/src/Text/Pandoc/App/OutputSettings.hs index 04ea89eda..264eb4a65 100644 --- a/src/Text/Pandoc/App/OutputSettings.hs +++ b/src/Text/Pandoc/App/OutputSettings.hs @@ -20,6 +20,9 @@ module Text.Pandoc.App.OutputSettings ) where import Prelude import qualified Control.Exception as E +import qualified Data.Text as T +import qualified Data.Map as M +import Text.DocTemplates (Context(..), ToContext(toVal)) import Control.Monad import Control.Monad.Except (catchError, throwError) import Control.Monad.Trans @@ -159,6 +162,8 @@ optToOutputSettings opts = do $ lines dztempl return $ ("dzslides-core", dzcore) : vars else return vars) + >>= fmap (Context . M.fromList) . + traverse (\(x,y) -> return (T.pack x, toVal (T.pack y))) templStr <- case optTemplate opts of _ | not standalone -> return Nothing |