-
Notifications
You must be signed in to change notification settings - Fork 363
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
#482: Smoke Testcase for the endless loop because of white-space hand… #483
Conversation
This is a special case only for this single case: Line-Width is 0 and the line only contains of a soft-hypen. In this case we don't need to try to break on the character level, as this will not work, but will lead to a endless loop. So we pretend we already did try to break on the character level. This ends the loop for this line.
This is no longer a smoke test, but also provides a fix for this problem which seems to work and not break any other test. |
hi @rototor , I may be wrong, but I think it will still fail if the string is larger than 1 but contains only SOFT_HYPHEN characters. I would guess for each input string, we should reduce it to always have only one consecutive SOFT_HYPHEN . |
…tter how many they are. Also extended the test file. Thanks to @syjer to bring these cases up.
@syjer You are right, I extended the testcase and the fix to also handle that cases. |
Thanks both of you. That would have taken me ages to find. |
…phen overflowing line. The core problem seems to be the under-reporting of width when we have a soft hyphen that is found to be unbreakable.
Plus minor behaviour change for word break method to avoid setting ends-on -soft-hyphen flag for soft hyphen at end of box.
This is to make sure infinite loop fixes do not break this functionality.
This should ensure no infinite loop bugs creep in over time.
…ling.
It demonstrates the bug in #482, a endless loop while trying to break a line. Should be included to detect regressions with that in future.