summaryrefslogtreecommitdiff
path: root/pandoc.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-01-22 11:36:30 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:43 +0100
commitd1efc839f129d23fe8a6523e33a01b0b463ee409 (patch)
tree73149a80a0dbd001689ee91d00692ea792209512 /pandoc.hs
parent6f9df9b4f1d3d22c53b9d6f3c333efc23a84ffe7 (diff)
Removed writerHighlight; made writerHighlightStyle a Maybe.
API change. For no highlighting, set writerHighlightStyle to Nothing.
Diffstat (limited to 'pandoc.hs')
-rw-r--r--pandoc.hs12
1 files changed, 4 insertions, 8 deletions
diff --git a/pandoc.hs b/pandoc.hs
index e1c2c9097..d13686cee 100644
--- a/pandoc.hs
+++ b/pandoc.hs
@@ -114,7 +114,6 @@ convertWithOpts opts args = do
, optSelfContained = selfContained
, optHtml5 = html5
, optHtmlQTags = htmlQTags
- , optHighlight = highlight
, optHighlightStyle = highlightStyle
, optTopLevelDivision = topLevelDivision
, optHTMLMathMethod = mathMethod'
@@ -324,7 +323,6 @@ convertWithOpts opts args = do
writerListings = listings,
writerBeamer = False,
writerSlideLevel = slideLevel,
- writerHighlight = highlight,
writerHighlightStyle = highlightStyle,
writerSetextHeaders = setextHeaders,
writerEpubMetadata = epubMetadata,
@@ -532,8 +530,7 @@ data Opt = Opt
, optSelfContained :: Bool -- ^ Make HTML accessible offline
, optHtml5 :: Bool -- ^ Produce HTML5 in HTML
, optHtmlQTags :: Bool -- ^ Use <q> tags in HTML
- , optHighlight :: Bool -- ^ Highlight source code
- , optHighlightStyle :: Style -- ^ Style to use for highlighted code
+ , optHighlightStyle :: Maybe Style -- ^ Style to use for highlighted code
, optTopLevelDivision :: TopLevelDivision -- ^ Type of the top-level divisions
, optHTMLMathMethod :: HTMLMathMethod -- ^ Method to print HTML math
, optReferenceDoc :: Maybe FilePath -- ^ Path of reference doc
@@ -595,8 +592,7 @@ defaultOpts = Opt
, optSelfContained = False
, optHtml5 = False
, optHtmlQTags = False
- , optHighlight = True
- , optHighlightStyle = pygments
+ , optHighlightStyle = Just pygments
, optTopLevelDivision = TopLevelDefault
, optHTMLMathMethod = PlainMath
, optReferenceDoc = Nothing
@@ -836,14 +832,14 @@ options =
, Option "" ["no-highlight"]
(NoArg
- (\opt -> return opt { optHighlight = False }))
+ (\opt -> return opt { optHighlightStyle = Nothing }))
"" -- "Don't highlight source code"
, Option "" ["highlight-style"]
(ReqArg
(\arg opt -> do
case lookup (map toLower arg) highlightingStyles of
- Just s -> return opt{ optHighlightStyle = s }
+ Just s -> return opt{ optHighlightStyle = Just s }
Nothing -> err 39 $ "Unknown style: " ++ arg)
"STYLE")
"" -- "Style for highlighted code"