parent
cdfdfae4dd
commit
ca7a3ed5ed
1 changed files with 16 additions and 10 deletions
|
@ -843,16 +843,22 @@ options =
|
|||
Nothing -> extensionsFromList extList
|
||||
Just fmt -> getAllExtensions $ T.pack fmt
|
||||
let formatName = maybe "markdown" T.pack arg
|
||||
let defExts = getDefaultExtensions formatName
|
||||
let showExt x =
|
||||
(if extensionEnabled x defExts
|
||||
then '+'
|
||||
else if extensionEnabled x allExts
|
||||
then '-'
|
||||
else ' ') : drop 4 (show x)
|
||||
mapM_ (UTF8.hPutStrLn stdout . T.pack . showExt)
|
||||
[ex | ex <- extList, extensionEnabled ex allExts]
|
||||
exitSuccess )
|
||||
if formatName `notElem`
|
||||
(map fst (readers :: [(Text, Reader PandocPure)]) ++
|
||||
map fst (writers :: [(Text, Writer PandocPure)]))
|
||||
then E.throwIO $ PandocOptionError $ formatName <>
|
||||
" is not a recognized reader or writer format"
|
||||
else do
|
||||
let defExts = getDefaultExtensions formatName
|
||||
let showExt x =
|
||||
(if extensionEnabled x defExts
|
||||
then '+'
|
||||
else if extensionEnabled x allExts
|
||||
then '-'
|
||||
else ' ') : drop 4 (show x)
|
||||
mapM_ (UTF8.hPutStrLn stdout . T.pack . showExt)
|
||||
[ex | ex <- extList, extensionEnabled ex allExts]
|
||||
exitSuccess )
|
||||
"FORMAT")
|
||||
""
|
||||
|
||||
|
|
Loading…
Reference in a new issue