Make --epub-title-page's argument optional.

It takes a boolean argument, and now that all of our boolean
flags take such an argument, we can make this one optional for
consistency.
This commit is contained in:
John MacFarlane
2023-07-16 10:51:18 -07:00
parent 7a04fe365a
commit a5a2248df8
+4 -8
View File
@@ -800,14 +800,10 @@ options =
"" -- "Path of epub cover image"
, Option "" ["epub-title-page"]
(ReqArg
(\arg opt ->
case arg of
"true" -> return opt{ optEpubTitlePage = True }
"false" -> return opt{ optEpubTitlePage = False }
_ -> optError $ PandocOptionError $
"Argument to --epub-title-page must be " <>
"true or false" )
(OptArg
(\arg opt -> do
boolValue <- readBoolFromOptArg "--epub-title-page" arg
return opt{ optEpubTitlePage = boolValue })
"true|false")
""