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

g.wrapString sometimes removing last character #2572

Open
retcurve opened this issue Oct 16, 2024 · 2 comments
Open

g.wrapString sometimes removing last character #2572

retcurve opened this issue Oct 16, 2024 · 2 comments

Comments

@retcurve
Copy link

retcurve commented Oct 16, 2024

g.wrapString is removing the last character if the character before it is one of the canSplitAfter characters, eg . - or ,
This happens no matter how wide the wrap width is. For example -

g.wrapString('test.a', 100) returns test. and not test.a

Multiple characters after the split character work fine (g.wrapString('test.aa', 100) returns test.aa) as do spaces (g.wrapString('test a', 100) returns test a)

@bobrippling
Copy link
Contributor

I can't see any recent changes to wrapString, @gfwilliams possibly a pre-existing bug?

@gfwilliams
Copy link
Member

Thanks for the report - yes, I doubt this is something that new - it probably came in when the word-splitting got added.

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

3 participants