diff options
Diffstat (limited to 'src/Text/Pandoc/App/OutputSettings.hs')
-rw-r--r-- | src/Text/Pandoc/App/OutputSettings.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Text/Pandoc/App/OutputSettings.hs b/src/Text/Pandoc/App/OutputSettings.hs index cfb6f7ec2..04ea89eda 100644 --- a/src/Text/Pandoc/App/OutputSettings.hs +++ b/src/Text/Pandoc/App/OutputSettings.hs @@ -35,7 +35,7 @@ import System.IO (stdout) import Text.Pandoc import Text.Pandoc.App.FormatHeuristics (formatFromFilePaths) import Text.Pandoc.App.Opt (Opt (..)) -import Text.Pandoc.App.CommandLineOptions (engines) +import Text.Pandoc.App.CommandLineOptions (engines, lookupHighlightStyle) import Text.Pandoc.BCP47 (Lang (..), parseBCP47) import qualified Text.Pandoc.UTF8 as UTF8 @@ -105,6 +105,9 @@ optToOutputSettings opts = do syntaxMap <- foldM addSyntaxMap defaultSyntaxMap (optSyntaxDefinitions opts) + hlStyle <- maybe (return Nothing) (fmap Just . lookupHighlightStyle) + (optHighlightStyle opts) + -- note: this reverses the list constructed in option parsing, -- which in turn was reversed from the command-line order, -- so we end up with the correct order in the variable list: @@ -221,7 +224,7 @@ optToOutputSettings opts = do , writerTopLevelDivision = optTopLevelDivision opts , writerListings = optListings opts , writerSlideLevel = optSlideLevel opts - , writerHighlightStyle = optHighlightStyle opts + , writerHighlightStyle = hlStyle , writerSetextHeaders = optSetextHeaders opts , writerEpubSubdirectory = optEpubSubdirectory opts , writerEpubMetadata = epubMetadata |