summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-25 14:52:40 -0300
committerGitHub <noreply@github.com>2017-01-25 14:52:40 -0300
commit4c28f35b2c6dacd30a0e10453af1bcd977de9342 (patch)
tree8d843a57b0a49a6bc09a799a5fc7bdb3540b944b /scene/resources
parent7e1afeafd4a347c309562c6783119f64e99fc317 (diff)
parent7dbb1c0571c0d1fb26c28552b09430807cc4d717 (diff)
Merge pull request #7002 from RandomShaper/vcs-friendliness
Greater VCS friendliness
Diffstat (limited to 'scene/resources')
-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 d25c0b5025..9719f321d6 100644
--- a/scene/resources/scene_format_text.cpp
+++ b/scene/resources/scene_format_text.cpp
@@ -1159,7 +1159,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;
}
@@ -1361,13 +1361,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;
}