-
Notifications
You must be signed in to change notification settings - Fork 21
replaced split_line with a multibyte aware version #61
Conversation
split_line was working fine as long as the input was just plain US-ASCII. When using multibyte characters and they happened to be at the end of the line to spit the function did panic. The new code returns correctly split lines even if they contain multibyte characters.
related to #60 |
Hello @ronnybremer, thanks for the PR. I will take a look asap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coule you add a test case with your exemple from #60 please? To ensure that will not recreate the bug.
Done. I also fixed the broken test from before, needed to take 75 characters of the first line but only 74 characters of subsequent lines as a " " is added in front of each line. |
the text to test should include the expected newline characters
I had to fix the test, too bad I can't run it myself without checking out the repo. The |
@Peltoche would you please start the testing stage again? Thank you. |
one last wrong character, can't believe it :( |
Sorry for the delay. |
LGTM, thanks for this PR 👍 |
split_line was working fine as long as the input was just plain US-ASCII. When using multibyte characters and they happened to be at the end of the line to spit the function did panic.
The new code returns correctly split lines even if they contain multibyte characters.