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

RichTextLabel incorrectly strips trailing whitespace if newline is present on right-aligned line #96456

Closed
milesturin opened this issue Sep 2, 2024 · 0 comments · Fixed by #96460
Assignees
Milestone

Comments

@milesturin
Copy link

milesturin commented Sep 2, 2024

Tested versions

  • Reproducible in: v4.3.stable.official [77dcf97]

System information

Godot v4.3.stable - macOS 14.2.1 - Vulkan (Forward+) - integrated Apple M2 Pro - Apple M2 Pro (12 Threads)

Issue description

According to the docs:

"Unlike BBCode in HTML, leading/trailing whitespace is not removed by a RichTextLabel upon display. Duplicate spaces are also displayed as-is in the final output."

However, i've run into a bug where RichTextLabels will automatically strip trailing whitespace on right-aligned lines if they end in newline.

Steps to reproduce

  1. Create a RichTextLabel
  2. Set the layout transform size to 256x256
  3. Enable BBCode
  4. Set the text to [right]TEST [/right]. This will not strip the whitespace, and will display correctly
  5. Add a newline. This will cause the previous line to no loner end in whitespace. If you add another [right]TEST [/right] line, it will display correctly as long as it is the last line in the textbox.

Minimal reproduction project (MRP)

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants