git.iko.soy/typeable/pandoc
on master help sign in
Handle unknown options in form `--latex-engine=foo`.

Previously these were not triggering the helpful message about option name changes.

commit5e1c4223899cb24ecf5f4ad1fd26c3ac22841e77 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 15 Oct 2017, 18:27 (9 years ago) parenteb508c1
1 file changed+2−1
src/Text/Pandoc/App.hs+2−1
src/Text/Pandoc/App.hs+2−1
@@ -110,7 +110,8 @@ parseOptions options' defaults = do
110110 let (actions, args, unrecognizedOpts, errors) =
111111 getOpt' Permute options' rawArgs
112112
113− let unknownOptionErrors = foldr handleUnrecognizedOption [] unrecognizedOpts
113+ let unknownOptionErrors = foldr handleUnrecognizedOption [] $
114+ map (takeWhile (/= '=')) unrecognizedOpts
114115
115116 unless (null errors && null unknownOptionErrors) $
116117 E.throwIO $ PandocOptionError $