A bit of refactoring that shouldn't change any semantics.

In preparation for a fix to #1267.
This commit is contained in:
John MacFarlane 2014-04-27 20:38:15 -07:00
parent f81fc6c3bd
commit f80678df7f

View file

@ -243,13 +243,13 @@ options :: [OptDescr (Opt -> IO Opt)]
options =
[ Option "fr" ["from","read"]
(ReqArg
(\arg opt -> return opt { optReader = map toLower arg })
(\arg opt -> return opt { optReader = arg })
"FORMAT")
""
, Option "tw" ["to","write"]
(ReqArg
(\arg opt -> return opt { optWriter = map toLower arg })
(\arg opt -> return opt { optWriter = arg })
"FORMAT")
""
@ -1008,11 +1008,10 @@ main = do
then "html"
else "markdown"
in defaultReaderName fallback sources
else readerName
else map toLower readerName
let writerName' = if null writerName
then defaultWriterName outputFile
else case writerName of
let writerName' = case map toLower writerName of
[] -> defaultWriterName outputFile
"epub2" -> "epub"
"html4" -> "html"
x -> x