RichTextLable bgcolor display problem

Godot Version

4.2.2

System

ArchLinux

Question

RichTextLabel uses default options and enables BBCode

BBCode1:

[bgcolor=red]                      [/bgcolor]k
[bgcolor=green]    [/bgcolor]

Simply deleting the ‘k’ at the end of the first line will cause only a space to be displayed on the first line. BBCode2:

[bgcolor=red]                      [/bgcolor]
[bgcolor=green]    [/bgcolor]

The display is also normal if newline is not used, BBCode3:

[bgcolor=red]                      [/bgcolor][bgcolor=green]    [/bgcolor]

I hope the display effect of BBCode2 is the same as BBCode1(without k), how can I solve this problem?

like this?

Yes, it seems that we are using the same BBCode, but the display is different, what did I do wrong?

​ U+200B ZERO WIDTH SPACE - Unicode Explorer copy and paste this to the end of each line
or try just copy this

[bgcolor=red]        [/bgcolor]​
[bgcolor=green]      [/bgcolor]​
1 Like