Only wrap on actual spaces
authorJeremy Stanley <fungi@yuggoth.org>
Sat, 30 Jun 2018 20:21:58 +0000 (20:21 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Sat, 30 Jun 2018 20:29:24 +0000 (20:29 +0000)
Trying to match on Unicode character classes to determine where to
wrap lines turns out to be a fragile and blacklist-heavy exercise.
Instead, just wrap on actual (ASCII \x20) space characters. This
fixes a bug where the escape characters starting ANSI sequences were
sometimes matching as a wrap point garbling the output, but also
simplifies the code by no longer needing to exclude carriage returns
in a CR+LF line ending sequence. Further it solves a couple TODO
reminders to stop wrapping on non-breaking (Unicode \xa0) space
characters.


No differences found