diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-08-27 16:55:06 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-08-27 16:55:06 +0200 |
commit | 9dfc41568afe738e0a5f5e57d67a1e580900b1ca (patch) | |
tree | d1b69904ce6ce888bcf69be359e896a8e27454c4 /modules/gdscript/gdscript_editor.cpp | |
parent | 3db976bdb77e0afa242ac5c7551f75fa88763679 (diff) | |
parent | 8bf4ecc026029eb7b16645c11930b73cf642dbfa (diff) | |
download | redot-engine-9dfc41568afe738e0a5f5e57d67a1e580900b1ca.tar.gz |
Merge pull request #95984 from timothyqiu/what-identifier
Add `String.is_valid_unicode_identifier()`
Diffstat (limited to 'modules/gdscript/gdscript_editor.cpp')
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index a6fd3f94da..636339ef1d 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -97,8 +97,8 @@ Ref<Script> GDScriptLanguage::make_template(const String &p_template, const Stri } processed_template = processed_template.replace("_BASE_", p_base_class_name) - .replace("_CLASS_SNAKE_CASE_", p_class_name.to_snake_case().validate_identifier()) - .replace("_CLASS_", p_class_name.to_pascal_case().validate_identifier()) + .replace("_CLASS_SNAKE_CASE_", p_class_name.to_snake_case().validate_ascii_identifier()) + .replace("_CLASS_", p_class_name.to_pascal_case().validate_ascii_identifier()) .replace("_TS_", _get_indentation()); scr->set_source_code(processed_template); return scr; @@ -3486,7 +3486,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c // is not a valid identifier. bool path_needs_quote = false; for (const String &part : opt.split("/")) { - if (!part.is_valid_identifier()) { + if (!part.is_valid_ascii_identifier()) { path_needs_quote = true; break; } |