Skip to content

Conversation

@security-log
Copy link

@security-log security-log commented Aug 20, 2025

Fixes #891

Changes

  • Modified: format/formats.go
    • emoji(): include glamour.WithWordWrap(0).

Why

  • The renderer introduced unwanted padding when converting short lines containing emoji. Disabling word wrap prevents Glamour from adding that padding.

How to reproduce

Before the fix

echo 'I :heart: Bubble Gum :candy:' | ./gum format -t emoji | sed 's/ /-/g'
I-❤-Bubble-Gum-🍬--------------------------------------------------------------

After the fix

echo 'I :heart: Bubble Gum :candy:' | ./gum format -t emoji | sed 's/ /-/g'
I-❤-Bubble-Gum-🍬

@security-log security-log requested a review from a team as a code owner August 20, 2025 00:52
@security-log security-log requested review from bashbunni and tauraamui and removed request for a team August 20, 2025 00:52
Copy link

@tauraamui tauraamui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! Can you add a test for this?

@security-log
Copy link
Author

Done, the tests are in

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.

gum format adds many spaces to end of string

2 participants