@@ -341,7 +341,28 @@ void EditorLog::_rebuild_log() {
341341bool EditorLog::_check_display_message (LogMessage &p_message) {
342342 bool filter_active = type_filter_map[p_message.type ]->is_active ();
343343 String search_text = search_box->get_text ();
344- bool search_match = search_text.is_empty () || p_message.text .containsn (search_text);
344+
345+ if (search_text.is_empty ()) {
346+ return filter_active;
347+ }
348+
349+ bool search_match = p_message.text .containsn (search_text);
350+
351+ // If not found and message contains BBCode tags, also check the parsed text
352+ if (!search_match && p_message.text .contains_char (' [' )) {
353+ // Lazy initialize the BBCode parser
354+ if (!bbcode_parser) {
355+ bbcode_parser = memnew (RichTextLabel);
356+ bbcode_parser->set_use_bbcode (true );
357+ }
358+
359+ // Ensure clean state for each message
360+ bbcode_parser->clear ();
361+ bbcode_parser->parse_bbcode (p_message.text );
362+ String parsed_text = bbcode_parser->get_parsed_text ();
363+ search_match = parsed_text.containsn (search_text);
364+ }
365+
345366 return filter_active && search_match;
346367}
347368
@@ -586,6 +607,10 @@ void EditorLog::deinit() {
586607}
587608
588609EditorLog::~EditorLog () {
610+ if (bbcode_parser) {
611+ memdelete (bbcode_parser);
612+ }
613+
589614 for (const KeyValue<MessageType, LogFilter *> &E : type_filter_map) {
590615 // MSG_TYPE_STD_RICH is connected to the std_filter button, so we do this
591616 // to avoid it from being deleted twice, causing a crash on closing.
0 commit comments