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

IndexError #20

Open
pmantyla opened this issue Sep 23, 2023 · 1 comment
Open

IndexError #20

pmantyla opened this issue Sep 23, 2023 · 1 comment

Comments

@pmantyla
Copy link

The snippet below results in an IndexError. It seems to have trouble wrapping the last word: "ch'entrate".

from hyphen.textwrap2 import TextWrapper
import hyphen

h_en = hyphen.Hyphenator('en_US')
wrapper = TextWrapper(width=70, use_hyphenator=h_en)
print(wrapper.fill("Abandon all hope, you who enter here (Lasciate ogni speranza, voi ch'entrate)."))
@pmantyla
Copy link
Author

pmantyla commented Sep 26, 2023

Here's an even simpler example:

import hyphen
h_en = hyphen.Hyphenator('en_US')
h_en.wrap('self-confidence', 14)

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

No branches or pull requests

1 participant