summaryrefslogtreecommitdiff
path: root/core/variant_parser.cpp
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 /core/variant_parser.cpp
parent7e1afeafd4a347c309562c6783119f64e99fc317 (diff)
parent7dbb1c0571c0d1fb26c28552b09430807cc4d717 (diff)
Merge pull request #7002 from RandomShaper/vcs-friendliness
Greater VCS friendliness
Diffstat (limited to 'core/variant_parser.cpp')
-rw-r--r--core/variant_parser.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp
index a833a275df..1e938b4899 100644
--- a/core/variant_parser.cpp
+++ b/core/variant_parser.cpp
@@ -1873,7 +1873,7 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
String str=p_variant;
- str="\""+str.c_escape()+"\"";
+ str="\""+str.c_escape_multiline()+"\"";
p_store_string_func(p_store_string_ud, str );
} break;
case Variant::VECTOR2: {
@@ -2091,7 +2091,7 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
dict.get_key_list(&keys);
keys.sort();
- p_store_string_func(p_store_string_ud,"{ ");
+ p_store_string_func(p_store_string_ud,"{\n");
for(List<Variant>::Element *E=keys.front();E;E=E->next()) {
/*
@@ -2099,14 +2099,14 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
continue;
*/
write(E->get(),p_store_string_func,p_store_string_ud,p_encode_res_func,p_encode_res_ud);
- p_store_string_func(p_store_string_ud,":");
+ p_store_string_func(p_store_string_ud,": ");
write(dict[E->get()],p_store_string_func,p_store_string_ud,p_encode_res_func,p_encode_res_ud);
if (E->next())
- p_store_string_func(p_store_string_ud,", ");
+ p_store_string_func(p_store_string_ud,",\n");
}
- p_store_string_func(p_store_string_ud," }");
+ p_store_string_func(p_store_string_ud,"\n}");
} break;