mirror of
https://github.com/dart-lang/sdk
synced 2024-09-19 23:41:50 +00:00
Fixed single quote escaping
BUG= R=sigmund@google.com Review URL: https://codereview.chromium.org//126063003 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31578 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
4b6fb5546a
commit
6d41224b82
|
@ -1494,6 +1494,9 @@ class _Parser {
|
|||
value = double.parse(termToken.text);
|
||||
break;
|
||||
case TokenKind.SINGLE_QUOTE:
|
||||
value = processQuotedString(false);
|
||||
value = "'${_escapeString(value, single: true)}'";
|
||||
return new LiteralTerm(value, value, _makeSpan(start));
|
||||
case TokenKind.DOUBLE_QUOTE:
|
||||
value = processQuotedString(false);
|
||||
value = '"${_escapeString(value)}"';
|
||||
|
@ -2129,6 +2132,9 @@ class _Parser {
|
|||
value = double.parse("${unary}${t.text}");
|
||||
break;
|
||||
case TokenKind.SINGLE_QUOTE:
|
||||
value = processQuotedString(false);
|
||||
value = "'${_escapeString(value, single: true)}'";
|
||||
return new LiteralTerm(value, value, _makeSpan(start));
|
||||
case TokenKind.DOUBLE_QUOTE:
|
||||
value = processQuotedString(false);
|
||||
value = '"${_escapeString(value)}"';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: csslib
|
||||
version: 0.9.1
|
||||
version: 0.9.2
|
||||
author: "Polymer.dart Team <web-ui-dev@dartlang.org>"
|
||||
description: A library for parsing CSS.
|
||||
homepage: https://www.dartlang.org
|
||||
|
|
|
@ -591,7 +591,7 @@ div:nth-child(2n) { color : red; }
|
|||
expect(errors.isEmpty, true, reason: errors.toString());
|
||||
expect(prettyPrint(stylesheet), r'''
|
||||
html:lang(fr-ca) {
|
||||
quotes: "\" " " \"";
|
||||
quotes: '" ' ' "';
|
||||
}
|
||||
zoom {
|
||||
}
|
||||
|
|
|
@ -258,7 +258,7 @@ void testUnicode() {
|
|||
|
||||
final String generated = r'''
|
||||
.toggle:after {
|
||||
content: "✔";
|
||||
content: '✔';
|
||||
line-height: 43px;
|
||||
font-size: 20px;
|
||||
color: #d9d9d9;
|
||||
|
|
Loading…
Reference in a new issue