Skip to content

Commit

Permalink
Merge pull request godotengine#62198 from Calinou/text-resource-remov…
Browse files Browse the repository at this point in the history
…e-extraneous-spaces

Remove spaces in `SubResource()/ExtResource/Resource()` in text resources
  • Loading branch information
akien-mga authored Jun 21, 2022
2 parents 40c360b + 514624c commit fdfbaf9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scene/resources/resource_format_text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1564,17 +1564,17 @@ String ResourceFormatSaverTextInstance::_write_resources(void *ud, const Ref<Res

String ResourceFormatSaverTextInstance::_write_resource(const Ref<Resource> &res) {
if (external_resources.has(res)) {
return "ExtResource( \"" + external_resources[res] + "\" )";
return "ExtResource(\"" + external_resources[res] + "\")";
} else {
if (internal_resources.has(res)) {
return "SubResource( \"" + internal_resources[res] + "\" )";
return "SubResource(\"" + internal_resources[res] + "\")";
} else if (!res->is_built_in()) {
if (res->get_path() == local_path) { //circular reference attempt
return "null";
}
//external resource
String path = relative_paths ? local_path.path_to_file(res->get_path()) : res->get_path();
return "Resource( \"" + path + "\" )";
return "Resource(\"" + path + "\")";
} else {
ERR_FAIL_V_MSG("null", "Resource was not pre cached for the resource section, bug?");
//internal resource
Expand Down

0 comments on commit fdfbaf9

Please sign in to comment.