summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/App/Opt.hs
diff options
context:
space:
mode:
authorElliot Bobrow <77182873+ebobrow@users.noreply.github.com>2022-06-14 16:00:18 -0700
committerGitHub <noreply@github.com>2022-06-14 17:00:18 -0600
commit6ff4972ca9ed194aae36d6a3cdfa90e4050713da (patch)
treed711040fa3d94fd3ff0dc262da9015b646abc51e /src/Text/Pandoc/App/Opt.hs
parent7244821705859037c763e1aae9ab35eaa5d9f05e (diff)
add `--embed-resources` flag (#8121)
* Add `--embed-resources` flag for `--self-contained` without implying `--standalone` * Deprecate `--self-contained flag` Closes #7331
Diffstat (limited to 'src/Text/Pandoc/App/Opt.hs')
-rw-r--r--src/Text/Pandoc/App/Opt.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs
index ae1248833..5d15560d8 100644
--- a/src/Text/Pandoc/App/Opt.hs
+++ b/src/Text/Pandoc/App/Opt.hs
@@ -96,7 +96,8 @@ data Opt = Opt
, optNumberOffset :: [Int] -- ^ Starting number for sections
, optSectionDivs :: Bool -- ^ Put sections in div tags in HTML
, optIncremental :: Bool -- ^ Use incremental lists in Slidy/Slideous/S5
- , optSelfContained :: Bool -- ^ Make HTML accessible offline
+ , optSelfContained :: Bool -- ^ Make HTML accessible offline (deprecated)
+ , optEmbedResources :: Bool -- ^ Make HTML accessible offline
, optHtmlQTags :: Bool -- ^ Use <q> tags in HTML
, optHighlightStyle :: Maybe Text -- ^ Style to use for highlighted code
, optSyntaxDefinitions :: [FilePath] -- ^ xml syntax defs to load
@@ -415,6 +416,8 @@ doOpt (k,v) = do
parseJSON v >>= \x -> return (\o -> o{ optIncremental = x })
"self-contained" ->
parseJSON v >>= \x -> return (\o -> o{ optSelfContained = x })
+ "embed-resources" ->
+ parseJSON v >>= \x -> return (\o -> o{ optEmbedResources = x })
"html-q-tags" ->
parseJSON v >>= \x -> return (\o -> o{ optHtmlQTags = x })
"highlight-style" ->
@@ -622,6 +625,7 @@ defaultOpts = Opt
, optSectionDivs = False
, optIncremental = False
, optSelfContained = False
+ , optEmbedResources = False
, optHtmlQTags = False
, optHighlightStyle = Just "pygments"
, optSyntaxDefinitions = []