aboutsummaryrefslogtreecommitdiff
path: root/scene/resources/scene_format_text.cpp
diff options
context:
space:
mode:
authorRémi Verschelde2017-01-25 20:56:17 +0100
committerGitHub2017-01-25 20:56:17 +0100
commitcdb0be8eed381b6cf28df6bc1eba26bb79eac576 (patch)
treed9dd5d086b36e5ecb3287c44f76465b3f5c56e38 /scene/resources/scene_format_text.cpp
parentad899a0dd974a58674882cefe62ac0914fdd4a6e (diff)
parent888f8b31e71141aee2436c154d992552c35e3d13 (diff)
downloadgodot-cdb0be8eed381b6cf28df6bc1eba26bb79eac576.tar.gz
godot-cdb0be8eed381b6cf28df6bc1eba26bb79eac576.tar.zst
godot-cdb0be8eed381b6cf28df6bc1eba26bb79eac576.zip
Merge pull request #7646 from RandomShaper/vcs-friendliness-2.1
Improve .tscn VCS (2.1)
Diffstat (limited to 'scene/resources/scene_format_text.cpp')
-rw-r--r--scene/resources/scene_format_text.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/scene/resources/scene_format_text.cpp b/scene/resources/scene_format_text.cpp
index 327aeb10d..abb66ff42 100644
--- a/scene/resources/scene_format_text.cpp
+++ b/scene/resources/scene_format_text.cpp
@@ -1158,7 +1158,7 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant& p_variant,b
static String _valprop(const String& p_name) {
if (p_name.find("\"")!=-1 || p_name.find("=")!=-1 || p_name.find(" ")!=-1)
- return "\""+p_name.c_escape()+"\"";
+ return "\""+p_name.c_escape_multiline()+"\"";
return p_name;
}
@@ -1354,13 +1354,11 @@ Error ResourceFormatSaverTextInstance::save(const String &p_path,const RES& p_re
}
if (groups.size()) {
- String sgroups=" groups=[ ";
+ String sgroups=" groups=[\n";
for(int j=0;j<groups.size();j++) {
- if (j>0)
- sgroups+=", ";
- sgroups+="\""+groups[j].operator String().c_escape()+"\"";
+ sgroups+="\""+String(groups[j]).c_escape()+"\",\n";
}
- sgroups+=" ]";
+ sgroups+="]";
header+=sgroups;
}