-
Notifications
You must be signed in to change notification settings - Fork 43
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
Option not to split words longer than a line #384
Comments
I now see there is a |
Hi @veikman, glad you found the |
Clarifying the documentation would be helpful; I don’t think you need to rename the option. I now understand that although I suggest making an explicit distinction, in the documentation of |
Rebuilt the package on top of `punwrap`, removing the homegrown regex logic and the passing of wordsplitters as parameters (this is the API break), which `punwrap` cannot handle. Results will be different. At the time of this commit, this rebuild is known to cause some bad behaviour; cf. mgeisler/textwrap#384.
As the documentation states, “
NoHyphenation
implementsWordSplitter
by not splitting the word at all.” However,textwrap::wrap
effectively overrides the stated behaviour when the width of a word exceeds the configured maximum width of a line.For contrast, Python provides a
break_long_words
option to allow individual words to exceed a given line width without being split. This allows long URLs, for example, to be preserved, which is useful.As a Rust newbie, I would like to know what it would take to get that freedom in
textwrap
.The text was updated successfully, but these errors were encountered: