git.iko.soy/typeable/pandoc
on master help sign in
Allow `--list-extensions` to take an optional FORMAT argument.
cc9e3a9John MacFarlane
MANUAL.txt+3−3
@@ -387,11 +387,11 @@ General options
387
387
388: List supported output formats, one per line.
388: List supported output formats, one per line.
389
389
390−`--list-extensions`
390+`--list-extensions`[`=`*FORMAT*]
391
391
392: List supported Markdown extensions, one per line, followed
392: List supported Markdown extensions, one per line, followed
393 by a `+` or `-` indicating whether it is enabled by default
393 by a `+` or `-` indicating whether it is enabled by default
394− in pandoc's Markdown.
394+ in *FORMAT* (defaulting to pandoc's Markdown).
395
395
396`--list-highlight-languages`
396`--list-highlight-languages`
397
397
@@ -1096,7 +1096,7 @@ of the following options.
1096 The *URL* should point to the `MathJax.js` load script.
1096 The *URL* should point to the `MathJax.js` load script.
1097 If a *URL* is not provided, a link to the Cloudflare CDN will
1097 If a *URL* is not provided, a link to the Cloudflare CDN will
1098 be inserted.
1098 be inserted.
1099−
1099+
1100`--mathml`
1100`--mathml`
1101
1101
1102: Convert TeX math to [MathML] (in `epub3`, `docbook4`, `docbook5`, `jats`,
1102: Convert TeX math to [MathML] (in `epub3`, `docbook4`, `docbook5`, `jats`,
src/Text/Pandoc/App.hs+6−4
@@ -1589,15 +1589,17 @@ options =
1589 ""
1589 ""
1590
1590
1591 , Option "" ["list-extensions"]
1591 , Option "" ["list-extensions"]
1592− (NoArg
1592+ (OptArg
1593− (\_ -> do
1593+ (\arg _ -> do
1594+ let exts = getDefaultExtensions (fromMaybe "markdown" arg)
1594 let showExt x = drop 4 (show x) ++
1595 let showExt x = drop 4 (show x) ++
1595− if extensionEnabled x pandocExtensions
1596+ if extensionEnabled x exts
1596 then " +"
1597 then " +"
1597 else " -"
1598 else " -"
1598 mapM_ (UTF8.hPutStrLn stdout . showExt)
1599 mapM_ (UTF8.hPutStrLn stdout . showExt)
1599 ([minBound..maxBound] :: [Extension])
1600 ([minBound..maxBound] :: [Extension])
1600− exitSuccess ))
1601+ exitSuccess )
1602+ "FORMAT")
1601 ""
1603 ""
1602
1604
1603 , Option "" ["list-highlight-languages"]
1605 , Option "" ["list-highlight-languages"]