summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-10-15 18:27:48 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2017-10-15 18:27:48 -0700
commit5e1c4223899cb24ecf5f4ad1fd26c3ac22841e77 (patch)
tree3b42db738b374e406e29240996b21ed4fc971a6f /src/Text/Pandoc
parenteb508c1330c631330463b95f4034a8dcd300a641 (diff)
Handle unknown options in form `--latex-engine=foo`.
Previously these were not triggering the helpful message about option name changes.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/App.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/App.hs b/src/Text/Pandoc/App.hs
index 6b64a314e..46696c425 100644
--- a/src/Text/Pandoc/App.hs
+++ b/src/Text/Pandoc/App.hs
@@ -110,7 +110,8 @@ parseOptions options' defaults = do
let (actions, args, unrecognizedOpts, errors) =
getOpt' Permute options' rawArgs
- let unknownOptionErrors = foldr handleUnrecognizedOption [] unrecognizedOpts
+ let unknownOptionErrors = foldr handleUnrecognizedOption [] $
+ map (takeWhile (/= '=')) unrecognizedOpts
unless (null errors && null unknownOptionErrors) $
E.throwIO $ PandocOptionError $