Lipgloss doesn't split on whitespace #217
Unanswered
CalebJohnHunt
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm just trying to use Lipgloss to limit my text's width like so:
I have a
var wrapper lipgloss.Style
, I copy it, set its width to its old width minus some constant, and render that text.I expect it to always split on whitespace (when possible), but I am occasionally finding weirdness such as the following:
(NB trailing spaces have been left in for accuracy)
The split between "I'm" and "considering" is totally reasonable, but what I don't understand is the split between "thu" and "mb" and newline after "mb". Since "...and the middle left thumb" is too long for the width (which is correct), I would instead expect
And to be clear, Lipgloss often is splitting on the whitespace, but just rarely (about 1 in 15 cases for me) it splits in the middle of a word.
Any thoughts why? Am I missing a setting?
Additional info (will be updated if more is brought up):
go1.21.0 linux/amd64
Beta Was this translation helpful? Give feedback.
All reactions