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

fix(TextComponent): add white-space pre formatting for inline text #4985

Merged
merged 3 commits into from
Dec 30, 2024

Conversation

sokripon
Copy link
Contributor

@sokripon sokripon commented Dec 20, 2024

The textcomponent did not render single whitespaces & line breaks, this PR fixes that.
Normal MC:
image
Before:
image
With fix:
image
closes #4975

@1zun4 1zun4 added this to the 0.23.0 milestone Dec 20, 2024
@sokripon
Copy link
Contributor Author

sokripon commented Dec 30, 2024

Without monospace:
image
With monospace:
image
It looks more natural without monospace so I added the option to disable monospace for preformatting.
I set the default for preformattingMonospace to true so that previous usages dont change.

@sokripon sokripon force-pushed the fix/servermodtspaces branch from ef8bbbb to c17d46f Compare December 30, 2024 02:37
@SenkJu SenkJu merged commit 2da0ce4 into CCBlueX:nextgen Dec 30, 2024
3 checks passed
commandblock2 pushed a commit to commandblock2/LiquidBounce that referenced this pull request Dec 31, 2024
…CBlueX#4985)

* fix(TextComponent): add white-space pre formatting for inline text

* feat(TextComponent): add preFormattingMonospace

* fix(multiplayer): disable preFormattingMonospace for TextComponent
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] Server description renders without newlines and sometimes without spaces
3 participants