Skip to content

fix: revert back to regular space #545

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

Open
wants to merge 1 commit into
base: v2-exp
Choose a base branch
from
Open

fix: revert back to regular space #545

wants to merge 1 commit into from

Conversation

caarlos0
Copy link
Member

@caarlos0 caarlos0 commented Jul 4, 2025

using   (\u00a0 - non breaking space) instead of a regular space seems to be causing all sorts of problems:

Maybe it's best to revert back to using regular spaces instead? Or make it opt-in?

refs #489

Signed-off-by: Carlos Alexandro Becker <[email protected]>
@caarlos0 caarlos0 self-assigned this Jul 4, 2025
@caarlos0 caarlos0 added the bug Something isn't working label Jul 4, 2025
@meowgorithm
Copy link
Member

Why don't we make it opt-in. There's a targeted case in Glamour where it improves user experience a great deal.

@@ -10,7 +10,7 @@ import (
)

const (
nbsp = '\u00A0'
nbsp = ' '
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
nbsp = ' '

@@ -395,9 +395,6 @@ func (s Style) Render(strs ...string) string {
str = padLeft(str, leftPadding, st, nbsp)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
str = padLeft(str, leftPadding, st, nbsp)
str = padLeft(str, leftPadding, st, ' ')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants