Closed
Description
We currently split the input string by whitespace and process the words one by one. This implies that we squeeze runs of whitespace to a single space.
We could instead have a mode where whitespace is significant and kept in the output. This would make it possible to wrap text like this line by line:
foobar: Have lots of foos and bars in the output.
baz: Show a single bar in the output, but only if it is a full moon.
Lines that wrap would still line up somewhat:
foobar: Have lots of foos and bars in
the output.
baz: Show a single bar in the output,
but only if it is a full moon.
In Python's textwrap this option is called replace_whitespace
, but I think I'll call it squeeze_whitespace
instead. The option should come in handy to support the output wanted in clap-rs/clap#617.