-
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
Respect non-breaking spaces #39
Labels
Comments
mgeisler
added a commit
that referenced
this issue
May 4, 2017
Non-breaking spaces are (obviously) treated as whitespace characters by the String::split_whitespace method, which meant that we would happily break words on such spaces. We now use String::split instead with our own predicate. Somewhat surprisingly, using String::split is about 15-20% faster than using String::split_whitespace, so we even get a performance boost out of this new code. Fixes #39.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to the comment on #28, we treat non-breaking spaces as normal whitespace and break on it. We should probably not do that :-)
The text was updated successfully, but these errors were encountered: