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

Unified Diff: src/string.js

Issue 94002: Fix for Issue 317 - bug in string.replace(string, "$foo"). (Closed)
Patch Set: Created 11 years, 8 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 | test/mjsunit/regress/regress-317.js » ('j') | test/mjsunit/regress/regress-317.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string.js
diff --git a/src/string.js b/src/string.js
index d9d6d6981194963b3a4709d9daace07b45718bf4..3ccad9a21a9d445217d639b602191f6e0a3f7c65 100644
--- a/src/string.js
+++ b/src/string.js
@@ -304,6 +304,8 @@ function ExpandReplacement(string, subject, matchInfo, builder) {
builder.add('$');
--position;
}
+ } else {
+ builder.add('$');
}
} else {
builder.add('$');
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-317.js » ('j') | test/mjsunit/regress/regress-317.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698