Allow \' in strings

This commit is contained in:
James Westman 2021-11-25 18:27:53 -06:00
parent 0afa62654d
commit 7cab7da4bb
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
3 changed files with 4 additions and 3 deletions

View file

@ -494,7 +494,8 @@ class UseQuoted(ParseNode):
string = (str(token)[1:-1] string = (str(token)[1:-1]
.replace("\\n", "\n") .replace("\\n", "\n")
.replace("\\\"", "\"") .replace("\\\"", "\"")
.replace("\\\\", "\\")) .replace("\\\\", "\\")
.replace("\\'", "\'"))
ctx.set_group_val(self.key, string, token) ctx.set_group_val(self.key, string, token)
return True return True

View file

@ -1,5 +1,5 @@
using Gtk 4.0; using Gtk 4.0;
Label { Label {
label: "Test 1 2 3\n & 4 \"5\" 6"; label: "Test 1 2 3\n & 4 \"5\' 6";
} }

View file

@ -3,6 +3,6 @@
<requires lib="gtk" version="4.0"/> <requires lib="gtk" version="4.0"/>
<object class="GtkLabel"> <object class="GtkLabel">
<property name="label">Test 1 2 3 <property name="label">Test 1 2 3
&amp; 4 "5" 6</property> &amp; 4 "5' 6</property>
</object> </object>
</interface> </interface>