git.iko.soy/typeable/pandoc
on master help sign in
Allow `--list-extensions` to take an optional FORMAT argument.

This lists the extensions set by default for the selected FORMAT.

commitcc9e3a91724dff0b962d23a58c1188d60dee07dd authorJohn MacFarlane <jgm@berkeley.edu> dateWed 27 Dec 2017, 12:25 (9 years ago) parentab9b9cf
2 files changed+9−7
MANUAL.txt+3−3 src/Text/Pandoc/App.hs+6−4
MANUAL.txt+3−3
@@ -387,11 +387,11 @@ General options
387387
388388: List supported output formats, one per line.
389389
390−`--list-extensions`
390+`--list-extensions`[`=`*FORMAT*]
391391
392392: List supported Markdown extensions, one per line, followed
393393 by a `+` or `-` indicating whether it is enabled by default
394− in pandoc's Markdown.
394+ in *FORMAT* (defaulting to pandoc's Markdown).
395395
396396`--list-highlight-languages`
397397
@@ -1096,7 +1096,7 @@ of the following options.
10961096 The *URL* should point to the `MathJax.js` load script.
10971097 If a *URL* is not provided, a link to the Cloudflare CDN will
10981098 be inserted.
1099−
1099+
11001100`--mathml`
11011101
11021102: Convert TeX math to [MathML] (in `epub3`, `docbook4`, `docbook5`, `jats`,
src/Text/Pandoc/App.hs+6−4
@@ -1589,15 +1589,17 @@ options =
15891589 ""
15901590
15911591 , Option "" ["list-extensions"]
1592− (NoArg
1593− (\_ -> do
1592+ (OptArg
1593+ (\arg _ -> do
1594+ let exts = getDefaultExtensions (fromMaybe "markdown" arg)
15941595 let showExt x = drop 4 (show x) ++
1595− if extensionEnabled x pandocExtensions
1596+ if extensionEnabled x exts
15961597 then " +"
15971598 else " -"
15981599 mapM_ (UTF8.hPutStrLn stdout . showExt)
15991600 ([minBound..maxBound] :: [Extension])
1600− exitSuccess ))
1601+ exitSuccess )
1602+ "FORMAT")
16011603 ""
16021604
16031605 , Option "" ["list-highlight-languages"]