-
Notifications
You must be signed in to change notification settings - Fork 45
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
Non breaking words #193
Comments
Hi @truchi! Oh wow, that looks odd... I'll take a look and try to fix it as soon as possible. Thanks for the report. |
mgeisler
added a commit
that referenced
this issue
Jul 1, 2020
Words wider than the line width were not handled correctly. The line width computation was messed up and this resulted in random-looking whitespace in the resulting lines. Fixes #193.
mgeisler
added a commit
that referenced
this issue
Jul 1, 2020
Words wider than the line width were not handled correctly. The line width computation was messed up and this resulted in random-looking whitespace in the resulting lines. Fixes #193.
mgeisler
added a commit
that referenced
this issue
Jul 2, 2020
mgeisler
added a commit
that referenced
this issue
Jul 2, 2020
You are welcome, sir. Thank you for the fix! |
mgeisler
added a commit
that referenced
this issue
Nov 8, 2020
This is a complete rewrite of the core word wrapping functionality. Before, we would step though the input string and (attempt to) keep track of all aspects of the state. This didn't always work (see at least #122, #158, #158, and #193) and it's inflexible. This commit replaces the old algorithm with a new one which works on a more abstract level. We now first 1. First split the input string into "words". A word is a substring of the original string, including any trailing whitespace. 2. We split each word according to the `WordSplitter`. 3. We then simply put the words into lines based on the display width. This is slower than the previous algorithm. The `fill/1600` benchmark shows that is now takes ~18 microseconds to wrap a 1600 character long string. That is around 8 microseconds longer than before.
mgeisler
added a commit
that referenced
this issue
Nov 8, 2020
This is a complete rewrite of the core word wrapping functionality. Before, we would step though the input string and (attempt to) keep track of all aspects of the state. This didn't always work (see at least #122, #158, #158, and #193) and it's inflexible. This commit replaces the old algorithm with a new one which works on a more abstract level. We now first 1. First split the input string into "words". A word is a substring of the original string, including any trailing whitespace. 2. We split each word according to the `WordSplitter`. 3. We then simply put the words into lines based on the display width. This is slower than the previous algorithm. The `fill/1600` benchmark shows that is now takes ~18 microseconds to wrap a 1600 character long string. That is around 8 microseconds longer than before.
mgeisler
added a commit
that referenced
this issue
Nov 8, 2020
This is a complete rewrite of the core word wrapping functionality. Before, we would step though the input string and (attempt to) keep track of all aspects of the state. This didn't always work (see at least #122, #158, #158, and #193) and it's inflexible. This commit replaces the old algorithm with a new one which works on a more abstract level. We now first 1. First split the input string into "words". A word is a substring of the original string, including any trailing whitespace. 2. We split each word according to the `WordSplitter`. 3. We then simply put the words into lines based on the display width. This is slower than the previous algorithm. The `fill/1600` benchmark shows that is now takes ~18 microseconds to wrap a 1600 character long string. That is around 8 microseconds longer than before.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
When I run:
I get the non-expected results:
Yet I expect:
Same with 2, 3, 4 ...
Thank you!
The text was updated successfully, but these errors were encountered: