mita
mita copied to clipboard
string - verifiation rules? pair-rule ?
The examples include two types of string definitions:
let text = "text";
let text = `text`;
and nested scenarios:
let text = `"text"`;
But it seems to be not possible, to use a " without a closing pair
let text = `"text`;
let text = `\"text`;
It seems, that there is a rule, the it must be always pairs. Is there a way to escape that assumed "pair-rule" ? Using "\" seems not to work.
This is a limitation of the parser framework we are using and the way we are parsing string interpolations. We have not found a way to do this directly like you are doing, but what you can do is write
let text = `${'"'}text`;