diff options
| author | Rémi Verschelde | 2017-01-25 20:56:17 +0100 |
|---|---|---|
| committer | GitHub | 2017-01-25 20:56:17 +0100 |
| commit | cdb0be8eed381b6cf28df6bc1eba26bb79eac576 (patch) | |
| tree | d9dd5d086b36e5ecb3287c44f76465b3f5c56e38 /core/ustring.cpp | |
| parent | ad899a0dd974a58674882cefe62ac0914fdd4a6e (diff) | |
| parent | 888f8b31e71141aee2436c154d992552c35e3d13 (diff) | |
| download | godot-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 '')
| -rw-r--r-- | core/ustring.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 5f19a6cff..df3815351 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3286,8 +3286,17 @@ String String::c_escape() const { escaped=escaped.replace("\t","\\t"); escaped=escaped.replace("\v","\\v"); escaped=escaped.replace("\'","\\'"); - escaped=escaped.replace("\"","\\\""); escaped=escaped.replace("\?","\\?"); + escaped=escaped.replace("\"","\\\""); + + return escaped; +} + +String String::c_escape_multiline() const { + + String escaped=*this; + escaped=escaped.replace("\\","\\\\"); + escaped=escaped.replace("\"","\\\""); return escaped; } |
