Skip to content
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

Bad hyphenation in layout example #107

Closed
mgeisler opened this issue Oct 6, 2017 · 0 comments
Closed

Bad hyphenation in layout example #107

mgeisler opened this issue Oct 6, 2017 · 0 comments
Labels

Comments

@mgeisler
Copy link
Owner

mgeisler commented Oct 6, 2017

I just noticed that the layout example looks weird:

$ cargo run --all-features --example layout
.------------------ Width: 46 -------------------.
| Memory safety without garbage collection. Co-  |
| ncurrency without data races. Zero-cost a-     |
| bstractions.                                   |
.-------------------- Width: 49 --------------------.
| Memory safety without garbage collection. Concu-  |
| rrency without data races. Zero-cost a-           |
| bstractions.                                      |
.-------------------- Width: 50 ---------------------.
| Memory safety without garbage collection. Concu-   |
| rrency without data races. Zero-cost abstra-       |
| ctions.                                            |

This is with version 0.9.0. I think there has been a regression since I don't believe it looked like this in the past — notice how all the hyphenated words are broken in weird places.

@mgeisler mgeisler added the bug label Oct 6, 2017
mgeisler added a commit that referenced this issue Dec 20, 2017
Before we did not take the width of the split into account when
hyphenating a word. This meant that all hyphenation was off by the
width of the whitespace (typically off by one when the split point was
a single space).

This has been broken since 4313d58 where I rewrote the splitting
algorithm to use Vec<Cow<str>> instead of Vec<String>. There is now a
test for this case.

Fixes #107.
mgeisler added a commit that referenced this issue Dec 20, 2017
Before we did not take the width of the split into account when
hyphenating a word. This meant that all hyphenation was off by the
width of the whitespace (typically off by one when the split point was
a single space).

This has been broken since 4313d58 where I rewrote the splitting
algorithm to use Vec<Cow<str>> instead of Vec<String>. There is now a
test for this case.

Fixes #107.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant