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

A little Bug Of PrintRich Function #103153

Closed
TamakoT opened this issue Feb 22, 2025 · 0 comments
Closed

A little Bug Of PrintRich Function #103153

TamakoT opened this issue Feb 22, 2025 · 0 comments
Labels

Comments

@TamakoT
Copy link

TamakoT commented Feb 22, 2025

Tested versions

v4.3.stable.mono.official [77dcf97]

System information

Godot v4.3.stable.mono - Windows 10.0.26100 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 Ti SUPER (NVIDIA; 32.0.15.7247) - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)

Issue description

I use the PrintRich function and BBCode to output colored strings. If this string contains a line break, it will additionally output a [/color] or other BBCode closing tag at the end of the string

Steps to reproduce

public partial class TestPrintRich : Node2D
{
public override void _Ready()
{
Ready += () =>
{
PrintMessage("one line");
GD.Print("-----");
PrintMessage("1 of 2 line\n2 of 2line");
};
}

private void PrintMessage(string message)
{
    GD.PrintRich($"[color=red][b]{message}[/b][/color]");
}

}

output:

Image

Minimal reproduction project (MRP)

nothing

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

No branches or pull requests

2 participants