diff options
| author | John MacFarlane <[email protected]> | 2020-04-17 17:28:55 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2020-04-17 22:55:44 -0700 |
| commit | 3eb9e1b8bd6eec9b96ab1da230b90d635970607e (patch) | |
| tree | dab56cee01110319f9f981c55aeb9e0f9993cac0 /src/Text/Pandoc/Class/CommonState.hs | |
| parent | 8f40b4ba14fce10199a059a281c9bd10c884241d (diff) | |
Fooling around with a new setup for Text.Pandoc.Data.initialize-data-files
It is Now an exported module, exporting initializeDataFiles which must
be run in PandocMonad if you are going to be looking for any data files.
The point of this is to decouple pandoc's data from "pandoc-core,"
including the infrastructure for PandocMonad.
Diffstat (limited to 'src/Text/Pandoc/Class/CommonState.hs')
| -rw-r--r-- | src/Text/Pandoc/Class/CommonState.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Class/CommonState.hs b/src/Text/Pandoc/Class/CommonState.hs index 7e1735c2b..b535e0c1d 100644 --- a/src/Text/Pandoc/Class/CommonState.hs +++ b/src/Text/Pandoc/Class/CommonState.hs @@ -19,6 +19,7 @@ where import Data.Default (Default (def)) import Data.Text (Text) +import qualified Data.ByteString as B import Text.Pandoc.BCP47 (Lang) import Text.Pandoc.MediaBag (MediaBag) import Text.Pandoc.Logging (LogMessage, Verbosity (WARNING)) @@ -50,6 +51,8 @@ data CommonState = CommonState , stResourcePath :: [FilePath] -- ^ Path to search for resources like -- included images + , stDataFiles :: [(FilePath, B.ByteString)] + -- ^ Data files baked into the binary if compiled with embed_data_files , stVerbosity :: Verbosity -- ^ Verbosity level , stTrace :: Bool @@ -75,6 +78,7 @@ defaultCommonState = CommonState , stInputFiles = [] , stOutputFile = Nothing , stResourcePath = ["."] + , stDataFiles = [] , stVerbosity = WARNING , stTrace = False } |
