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

Unified Diff: src/string.js

Issue 1114001: Refactoring of RegExp interface to better support calling several times in a row. (Closed)
Patch Set: Fix type that snuck into the commit. Created 10 years, 9 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
Index: src/string.js
diff --git a/src/string.js b/src/string.js
index 6bb19e9548c00e76c56abd4d2353126dad60bbe1..a871e0e8e724e029b78cb1e667fe51dd27a93b03 100644
--- a/src/string.js
+++ b/src/string.js
@@ -416,7 +416,7 @@ function addCaptureString(builder, matchInfo, index) {
function StringReplaceRegExpWithFunction(subject, regexp, replace) {
var matchInfo = DoRegExpExec(regexp, subject, 0);
if (IS_NULL(matchInfo)) return subject;
-
+
Erik Corry 2010/03/19 11:04:11 Trailing spaces?
Lasse Reichstein 2010/03/19 11:25:42 Done.
var result = new ReplaceResultBuilder(subject);
// There's at least one match. If the regexp is global, we have to loop
// over all matches. The loop is not in C++ code here like the one in
« src/jsregexp.cc ('K') | « src/jsregexp.cc ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698