diff options
Diffstat (limited to 'src/Text')
| -rw-r--r-- | src/Text/Pandoc/App/CommandLineOptions.hs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs index bc7e1b2fd..4bca19d91 100644 --- a/src/Text/Pandoc/App/CommandLineOptions.hs +++ b/src/Text/Pandoc/App/CommandLineOptions.hs @@ -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") "" |
