ppkarwasz opened a new pull request, #1655:
URL: https://github.com/apache/commons-lang/pull/1655
`WordUtils.wrap` advanced the offset by a single character past each
`wrapOn` match, assuming the separator is always exactly one character long:
- When the `wrapOn` regex matched several characters, the surplus separator
characters were left in the wrapped output instead of being consumed,
- When the `wrapOn` regex matched zero characters, one additional character
was consumed.
Now it tracks the end offset of each match and resume from there, so that
separators of any length, including zero-width matches, are skipped correctly.
- [x] I used AI to refactor test and reword descriptions
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]