diff options
| author | John MacFarlane <[email protected]> | 2024-06-30 11:32:16 -0600 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-07-01 08:56:17 -0600 |
| commit | 3fe1f0fe20226144d992e1be2a378aa7f69d884a (patch) | |
| tree | 354d8bc773f39d558c4fdcb83b56a5e2b69429c1 /src/Text/Pandoc/App/Opt.hs | |
| parent | 51f3da649c7832f6b92b66dbb58a77f5d6d28360 (diff) | |
Add option to link rather than embedding images in ODT.link-images
New cli option: `--link-images`. This causes images to be linked
rather than embedded in ODT.
New field in WriterOptions: `writerLinkImages` [API change].
New field in Opt: `optLinkImages` [API change].
Closes #9815.
Diffstat (limited to 'src/Text/Pandoc/App/Opt.hs')
| -rw-r--r-- | src/Text/Pandoc/App/Opt.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Text/Pandoc/App/Opt.hs b/src/Text/Pandoc/App/Opt.hs index c1f16279c..b6050f117 100644 --- a/src/Text/Pandoc/App/Opt.hs +++ b/src/Text/Pandoc/App/Opt.hs @@ -119,6 +119,7 @@ data Opt = Opt , optIncremental :: Bool -- ^ Use incremental lists in Slidy/Slideous/S5 , optSelfContained :: Bool -- ^ Make HTML accessible offline (deprecated) , optEmbedResources :: Bool -- ^ Make HTML accessible offline + , optLinkImages :: Bool -- ^ Link ODT images rather than embedding , optHtmlQTags :: Bool -- ^ Use <q> tags in HTML , optHighlightStyle :: Maybe Text -- ^ Style to use for highlighted code , optSyntaxDefinitions :: [FilePath] -- ^ xml syntax defs to load @@ -201,6 +202,7 @@ instance FromJSON Opt where <*> o .:? "incremental" .!= optIncremental defaultOpts <*> o .:? "self-contained" .!= optSelfContained defaultOpts <*> o .:? "embed-resources" .!= optEmbedResources defaultOpts + <*> o .:? "link-images" .!= optLinkImages defaultOpts <*> o .:? "html-q-tags" .!= optHtmlQTags defaultOpts <*> o .:? "highlight-style" <*> o .:? "syntax-definitions" .!= optSyntaxDefinitions defaultOpts @@ -526,6 +528,8 @@ doOpt (k,v) = do parseJSON v >>= \x -> return (\o -> o{ optSelfContained = x }) "embed-resources" -> parseJSON v >>= \x -> return (\o -> o{ optEmbedResources = x }) + "link-images" -> + parseJSON v >>= \x -> return (\o -> o{ optLinkImages = x }) "html-q-tags" -> parseJSON v >>= \x -> return (\o -> o{ optHtmlQTags = x }) "highlight-style" -> @@ -738,6 +742,7 @@ defaultOpts = Opt , optIncremental = False , optSelfContained = False , optEmbedResources = False + , optLinkImages = False , optHtmlQTags = False , optHighlightStyle = Just "pygments" , optSyntaxDefinitions = [] |
