diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-12-28 12:12:22 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-12-28 12:12:22 -0800 |
commit | e10864d9d59ac292fbf69031263931a8f6c9209a (patch) | |
tree | 801b8af5a1c424ee8858466343d807b924b73103 | |
parent | 3494b6efd32bebb36e3bef204be6d51650ac6085 (diff) | |
download | pandoc-e10864d9d59ac292fbf69031263931a8f6c9209a.tar.gz |
Changed format of --list-extensions.
Now the + or - occurs first.
-rw-r--r-- | MANUAL.txt | 5 | ||||
-rw-r--r-- | src/Text/Pandoc/App.hs | 7 |
2 files changed, 6 insertions, 6 deletions
diff --git a/MANUAL.txt b/MANUAL.txt index 05018be93..87c30ed9d 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -389,9 +389,10 @@ General options `--list-extensions`[`=`*FORMAT*] -: List supported Markdown extensions, one per line, followed +: List supported Markdown extensions, one per line, preceded by a `+` or `-` indicating whether it is enabled by default - in *FORMAT* (defaulting to pandoc's Markdown). + in *FORMAT*. If *FORMAT* is not specified, defaults for + pandoc's Markdown are given. `--list-highlight-languages` diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index 50464830b..e46d03025 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -1592,10 +1592,9 @@ options = (OptArg (\arg _ -> do let exts = getDefaultExtensions (fromMaybe "markdown" arg) - let showExt x = drop 4 (show x) ++ - if extensionEnabled x exts - then " +" - else " -" + let showExt x = (if extensionEnabled x exts + then '+' + else '-') : drop 4 (show x) mapM_ (UTF8.hPutStrLn stdout . showExt) ([minBound..maxBound] :: [Extension]) exitSuccess ) |