-
Notifications
You must be signed in to change notification settings - Fork 235
A bug in word wrapping (with a failing test case) #452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
A bug in word wrapping (with a failing test case) #452
Conversation
|
Continued to work on this a bit, I think I have found the location where this "double-wrapping" happens. In |
| w.addSpace() | ||
| w.addWord() | ||
| _, _ = w.buf.WriteRune(c) | ||
| w.lineLen++ |
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.
This single line was the fix, a PR is open here: muesli/reflow#77
Not sure how you feel about vendoring the wordwrap logic but the muesli/reflow repo seemed to not be active and waiting for a PR merged there may not be fun.
|
Any input on this @caarlos0 @aymanbagabas? |
|
|
Thank you, @markusylisiurunen, for taking a stab at this. However, currently we're focusing on the v2 branch along with the x/ansi and x/cellbuf packages which provide the word wrapping logic in v2. Please check out these package and whether the |
This is a failing test case related to #451. I tried to pinpoint the actual bug but could not find it (at least yet).