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

Unified Diff: frog/lib/string_implementation.dart

Issue 8763018: Fix NamingTest on all Frog configurations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 | « frog/lib/natives.dart ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/lib/string_implementation.dart
diff --git a/frog/lib/string_implementation.dart b/frog/lib/string_implementation.dart
index d8975a52f1bd606098256f09aada071febdd7022..4ad3f531f5a1a2e52d6e35e212a72e88b23e44db 100644
--- a/frog/lib/string_implementation.dart
+++ b/frog/lib/string_implementation.dart
@@ -48,6 +48,7 @@ class StringImplementation implements String native "String" {
String replaceAll(Pattern from, String to) native @"""
if (typeof(from) == 'string' || from instanceof String) {
from = new RegExp(from.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"), 'g');
+ to = to.replace(/\$/g, '$$$$'); // Escape sequences are fun!
jimhug 2011/12/14 22:14:47 I wanted to suggest that you use @'$$' to simplify
}
return this.replace(from, to);""";
« no previous file with comments | « frog/lib/natives.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698