-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
If the last word is greater than the limit, we wouldn't set the next line break at all, and it would be left at 0, causing an infinite loop in the final loop to apply the line breaks. To fix this, recognize that the last word must be on the last line, so its length doesn't matter. Always set the last word's next break to the end of the text. Fixes #1. Closes #2.
- Loading branch information
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters