diff options
-rw-r--r-- | MANUAL.txt | 6 | ||||
-rw-r--r-- | src/Text/Pandoc/App.hs | 10 |
2 files changed, 9 insertions, 7 deletions
diff --git a/MANUAL.txt b/MANUAL.txt index 099b710be..05018be93 100644 --- a/MANUAL.txt +++ b/MANUAL.txt @@ -387,11 +387,11 @@ General options : List supported output formats, one per line. -`--list-extensions` +`--list-extensions`[`=`*FORMAT*] : List supported Markdown extensions, one per line, followed by a `+` or `-` indicating whether it is enabled by default - in pandoc's Markdown. + in *FORMAT* (defaulting to pandoc's Markdown). `--list-highlight-languages` @@ -1096,7 +1096,7 @@ of the following options. The *URL* should point to the `MathJax.js` load script. If a *URL* is not provided, a link to the Cloudflare CDN will be inserted. - + `--mathml` : Convert TeX math to [MathML] (in `epub3`, `docbook4`, `docbook5`, `jats`, diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs index 641d3782b..50464830b 100644 --- a/src/Text/Pandoc/App.hs +++ b/src/Text/Pandoc/App.hs @@ -1589,15 +1589,17 @@ options = "" , Option "" ["list-extensions"] - (NoArg - (\_ -> do + (OptArg + (\arg _ -> do + let exts = getDefaultExtensions (fromMaybe "markdown" arg) let showExt x = drop 4 (show x) ++ - if extensionEnabled x pandocExtensions + if extensionEnabled x exts then " +" else " -" mapM_ (UTF8.hPutStrLn stdout . showExt) ([minBound..maxBound] :: [Extension]) - exitSuccess )) + exitSuccess ) + "FORMAT") "" , Option "" ["list-highlight-languages"] |