Browse Source

Fix BBCode print with nested `[`.

Pāvels Nadtočajevs 4 months ago
parent
commit
bd3a264011
1 changed files with 2 additions and 1 deletions
  1. 2 1
      core/string/print_string.cpp

+ 2 - 1
core/string/print_string.cpp

@@ -257,7 +257,8 @@ void __print_line_rich(const String &p_string) {
 		} else if (tag == "/fgcolor") {
 		} else if (tag == "/fgcolor") {
 			output += "\u001b[39;49m";
 			output += "\u001b[39;49m";
 		} else {
 		} else {
-			output += vformat("[%s]", tag);
+			output += "[";
+			pos = brk_pos + 1;
 		}
 		}
 	}
 	}
 	output += "\u001b[0m"; // Reset.
 	output += "\u001b[0m"; // Reset.