Open ghostsquad opened 6 years ago
Hmm, yes, the parser in docopt.go is actually still a bit of a spaghetti mess imho. I started playing around with fuzz-testing it and I found a whole lot of bugs, and then I pretty much left things at that, resolving to maybe one day just rewrite the whole thing.
I'm not going to have time to look at this any time soon, I'm sorry. But I'll leave this issue here for posterity. Maybe we can make a test case from it some day and someone can fix it if they want.
Description
When a non-option line comes after the
Options:
declaration, parsing fails in weird ways. Not only are options missing, but-h
and--help
are now split. This doesn't happen at try.docopt.org.Repro
Expected Behavior
Actual Behavior