ndmitchell / cmdargs

Haskell library for command line argument processing
Other
90 stars 12 forks source link

modeHelp eats blank lines #49

Open simonmichael opened 6 years ago

simonmichael commented 6 years ago

I have a mode-building helper that wants to show multiple blank-line-separated paragraphs of help text, above the cmdargs-generated flags/subcommands help. This means using modeHelp, not modeHelpSuffix, but it seems blank lines in modeHelp are always removed. How about a PR to change that ?

simonmichael commented 6 years ago

I mean: would a PR to stop this behaviour be welcome ? (Or if you change it before I figure out how, even better.)

And if the former... I guess a Test11 failure on mac with GHC 8.2 is expected ?

$ stack exec -- cmdargs --test
..........................................................................................................................................................................................................................................................................

FAILURE
Failed when should have succeeded
Name: Implicit Test11
Args: ["test11b","test"]
Error: Unhandled argument, none expected: test
......cmdargs: System.Console.CmdArgs.Implicit, unexpected no available name: ?
CallStack (from HasCallStack):
  error, called at ./System/Console/CmdArgs/Implicit/Local.hs:106:11 in main:System.Console.CmdArgs.Implicit.Local