mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #104542 from bruvzg/rtl_fix_fx_regex
[RTL] Fix `float` and `int` matching in FX environment.
This commit is contained in:
commit
9a0ea64bd6
1 changed files with 5 additions and 5 deletions
|
|
@ -6954,10 +6954,10 @@ Dictionary RichTextLabel::parse_expressions_for_values(Vector<String> p_expressi
|
|||
nodepath.compile("^\\$");
|
||||
RegEx boolean = RegEx();
|
||||
boolean.compile("^(true|false)$");
|
||||
RegEx decimal = RegEx();
|
||||
decimal.compile("^-?^.?\\d+(\\.\\d+?)?$");
|
||||
RegEx numerical = RegEx();
|
||||
numerical.compile("^\\d+$");
|
||||
numerical.compile("^[-+]?\\d+$");
|
||||
RegEx decimal = RegEx();
|
||||
decimal.compile("^[+-]?\\d*(\\.\\d*)?([eE][+-]?\\d+)?$");
|
||||
|
||||
for (int j = 0; j < values.size(); j++) {
|
||||
if (color.search(values[j]).is_valid()) {
|
||||
|
|
@ -6973,10 +6973,10 @@ Dictionary RichTextLabel::parse_expressions_for_values(Vector<String> p_expressi
|
|||
} else if (values[j] == "false") {
|
||||
a.append(false);
|
||||
}
|
||||
} else if (decimal.search(values[j]).is_valid()) {
|
||||
a.append(values[j].to_float());
|
||||
} else if (numerical.search(values[j]).is_valid()) {
|
||||
a.append(values[j].to_int());
|
||||
} else if (decimal.search(values[j]).is_valid()) {
|
||||
a.append(values[j].to_float());
|
||||
} else {
|
||||
a.append(values[j]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue