diff options
Diffstat (limited to 'src/Text/Pandoc/App/CommandLineOptions.hs')
| -rw-r--r-- | src/Text/Pandoc/App/CommandLineOptions.hs | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs index b28013107..e9d5e0597 100644 --- a/src/Text/Pandoc/App/CommandLineOptions.hs +++ b/src/Text/Pandoc/App/CommandLineOptions.hs @@ -520,13 +520,18 @@ options = , Option "" ["no-highlight"] (NoArg - (\opt -> return opt { optHighlightStyle = Nothing })) + (\opt -> do + deprecatedOption "--no-highlight" + "Use --syntax-highlighting=none instead." + return opt { optSyntaxHighlighting = NoHighlightingString })) "" -- "Don't highlight source code" , Option "" ["highlight-style"] (ReqArg - (\arg opt -> - return opt{ optHighlightStyle = Just $ + (\arg opt -> do + deprecatedOption "--highlight-style" + "Use --syntax-highlighting instead." + return opt{ optSyntaxHighlighting = T.pack $ normalizePath arg }) "STYLE|FILE") "" -- "Style for highlighted code" @@ -539,6 +544,14 @@ options = "FILE") "" -- "Syntax definition (xml) file" + , Option "" ["syntax-highlighting"] + (ReqArg + (\arg opt -> return opt{ optSyntaxHighlighting = + T.pack $ normalizePath arg }) + "none|default|idiomatic|<stylename>|<themepath>") + "" -- "syntax highlighting method for code" + + , Option "" ["dpi"] (ReqArg (\arg opt -> @@ -809,8 +822,14 @@ options = , Option "" ["listings"] (OptArg (\arg opt -> do - boolValue <- readBoolFromOptArg "--listings" arg - return opt { optListings = boolValue }) + deprecatedOption "--listings" + "Use --syntax-highlighting=idiomatic instead." + boolValue <- readBoolFromOptArg "--listings" arg + return $ + if boolValue + then opt { optSyntaxHighlighting = + IdiomaticHighlightingString } + else opt) "true|false") "" -- "Use listings package for LaTeX code blocks" |
