ES4 draft: Triply quoted string literals

Waldemar Horwat waldemar at
Tue Mar 4 12:51:32 PST 2008

Lars Hansen wrote:
>> I'm not sure what the intent is, but as this is written:
>> """abc""""def"""
>> will evaluate to the same string as 'abc""""def'.
> It will not.  The text of the spec is "The literal is terminated by the
> earliest sequence of three unescaped instances of the the same quote
> character that is not followed by a fourth quote character of the same
> kind."  So the string is the four-letter sequence abc".  Perhaps the
> sentence would be even clearer if the word "immediately" were to precede
> the word "followed".

>From the discussions on the list I knew what you meant, but as written this is ambiguous.  I read it as a string of four or more quote characters not being eligible to be a terminator, so you skip it and look for the next sequence.


More information about the Es4-discuss mailing list