From: Erik Verbruggen Date: Tue, 19 Mar 2013 12:04:54 +0000 (+0100) Subject: Fix multi-line string content. X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=9582ca0ce1758572d1ad59548fe221ca2e51598b;p=konrad%2Fqtdeclarative.git Fix multi-line string content. ECMA5.1, paragraph 7.8.4, item 9 under semantics: The SV of LineContinuation :: \ LineTerminatorSequence is the empty character sequence. So, do not add any line-terminator inside a multi-line string. Escaped characters like \r and \n are added of course. Change-Id: I8c58b7971b1d1bc90adc795ea278541758246e01 Reviewed-by: Lars Knoll --- diff --git a/src/qml/qml/parser/qqmljslexer.cpp b/src/qml/qml/parser/qqmljslexer.cpp index 0df4927..cb78238 100644 --- a/src/qml/qml/parser/qqmljslexer.cpp +++ b/src/qml/qml/parser/qqmljslexer.cpp @@ -782,22 +782,11 @@ again: return T_ERROR; case '\r': - if (isLineTerminatorSequence() == 2) { - _tokenText += QLatin1Char('\r'); - u = QLatin1Char('\n'); - } else { - u = QLatin1Char('\r'); - } - scanChar(); - break; - case '\n': case 0x2028u: case 0x2029u: - u = _char; scanChar(); - break; - + continue; default: // non escape character diff --git a/tests/auto/qml/v4/data/equals.qml b/tests/auto/qml/v4/data/equals.qml index c32603c..2862bb7 100644 --- a/tests/auto/qml/v4/data/equals.qml +++ b/tests/auto/qml/v4/data/equals.qml @@ -44,5 +44,8 @@ QtObject { property bool test32: true != zero property bool test33: true == 1 property bool test34: true != 1 + + property bool test35: "a\ +b" === "ab" }