Open
Description
When combining word-wrapping with unconditional wrapping as described in the README, extra linebreaks can sometimes be found in the output.
For example:
const str = "the quick brown foxxxxxxxxxxxxxxxx jumped over the lazy dog."
const limit = 16
wrapped := wrap.String(wordwrap.String(str, limit), limit)
fmt.Println(wrapped)
Outputs:
the quick brown
foxxxxxxxxxxxxxx
xx
jumped over the
lazy dog.
However, I'd expect it to be:
the quick brown
foxxxxxxxxxxxxxx
xx jumped over
the lazy dog.