Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: pkg/csslib/lib/parser.dart

Issue 126063003: Fixed single quote escaping (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/csslib/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/csslib/lib/parser.dart
diff --git a/pkg/csslib/lib/parser.dart b/pkg/csslib/lib/parser.dart
index 840b9f23998e72395f335368ebe735b73bdf2656..ba8cd1360cf3b7ba4079f6d6b8021c2724ab2580 100644
--- a/pkg/csslib/lib/parser.dart
+++ b/pkg/csslib/lib/parser.dart
@@ -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)}"';
« no previous file with comments | « no previous file | pkg/csslib/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698