docopt / docopt.go

A command-line arguments parser that will make you smile.
http://docopt.org/
MIT License
1.43k stars 111 forks source link

Saner indentation handling #40

Open mcandre opened 7 years ago

mcandre commented 7 years ago

Normally, the docopt spec would have usage strings indenting with two spaces. However, Go formatting overall prefers a hard tab, which often conflicts with styling tools like gofmt.

When the usage string (e.g., a Go multiline backticked string) has a mix of hard and soft tabs, docopt prints a misaligned help message. While this is a cosmetic error, this conflict risks causing parse errors.

For docopt-go, could we expand the parser to treat \t as equivalent to two spaces?

ghostsquad commented 6 years ago

Wow, this has been open for awhile with no response?