Skip to content

fix: stop padding multiline styled messages with trailing spaces - #228

Open
TastyHeadphones wants to merge 1 commit into
charmbracelet:mainfrom
TastyHeadphones:fix/multiline-message-style-padding
Open

TastyHeadphones wants to merge 1 commit into
charmbracelet:mainfrom
TastyHeadphones:fix/multiline-message-style-padding

Conversation

@TastyHeadphones

Copy link
Copy Markdown

lipgloss pads every line to the widest one when you Render a string that has newlines. We were styling the whole multiline message in one shot, so shorter lines got a bunch of trailing spaces (especially ugly with padded level styles).

Now each line is styled on its own, same idea as the multiline field values path.

Fixes #187

lipgloss pads every line to the widest line when Render gets a string
with newlines, so styled multiline messages picked up huge trailing
spaces. Render each line on its own instead.

Fixes charmbracelet#187
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

Successfully merging this pull request may close these issues.

bug: strange whitespace in output with styles applied

1 participant