Example:
foo = "{variable} is {if (condition) "granted" else "denied"}";
doesn't pass editor syntax check. Replacing quotes within { } against ticks (single quotes, ') helps, but I believe that syntax check should be smart enough to recognize the new context of double quotes between curly brackets.
nest quote matching between { }
Moderator: Martin
Re: nest quote matching between { }
Doublequotes within a string need to be escaped with a backslash, otherwise the string is terminated when the second doublequote is encountered.
Following line should work:
foo = "{variable} is {if (condition) \"granted\" else \"denied\"}";
Following line should work:
foo = "{variable} is {if (condition) \"granted\" else \"denied\"}";
Re: nest quote matching between { }
"...otherwise the string is terminated when the second doublequote.." - yes, that's why I'm asking for this: the curly braces { } are not becoming part of the string, instead they create a new interpretation context. Therefore it should make sense that double quotes are paired within that new context too. Else, for consistency reasons, one should ask to escape nested curly braces too, lest the closing brace of the inner pair of braces terminates the outer braces context ...