Fix editor log search ignoring BBCode formatting in messages#110972
Fix editor log search ignoring BBCode formatting in messages#110972Repiteo merged 1 commit intogodotengine:masterfrom
Conversation
There was a problem hiding this comment.
Tested locally, it works as expected.
However, this could perhaps be implemented more efficiently with #78310 strip_bbcode() method. The downside is that you wouldn't be able to search something with its tags anymore, but I wonder how common of a use case this is to warrant the performance cost.
![]() |
![]() |
|---|
func _ready() -> void:
for i in ["red", "green", "cyan", "magenta", "yellow", "white"]:
print_rich("G[b][i][shake][color=%s]owo[/color][/shake][/i][/b]dot" % i)
I thought of this as well however I did not want to assume that, those who would print with color do not want to use that as a searchable identifier. While my implementation is a little hacky, it should only use one instance of the rich text label and, it should only try to search if it can not find a match otherwise. I also thought about removing the
as it hurts to look at. Do you see any significant down side in just attempting to parse all of the strings that do not match immediately for bbcode? like so: |
|
I think the current implementation is fine. Checking for |
|
Could you squash your commits? See our pull request guidelines for more information |
When searching in the editor output log, messages with BBCode formatting (like [color=red]text[/color]) would not be found when searching for the plain text content. For example, searching for "Example is" in a message "[color=blue]EXAMPLE[/color] is super cool" would fail to find the match.
2575c89 to
5d8fae4
Compare
|
Thanks! Congratulations on your first merged contribution! 🎉 |
|
Cherry-picked for 4.5.2. |




When searching in the editor output log, messages with BBCode formatting (like [color=red]text[/color]) would not be found when searching for the plain text content. For example, searching for "Example is" in a message "[color=blue]EXAMPLE[/color] is super cool" would fail to find the match.
Resolves #110967
Before searching:

After searching:

Search still works for searching specifically with bbcode syntax, and string literals representing bbcode syntax:
