Index: src/regexp.js |
=================================================================== |
--- src/regexp.js (revision 11284) |
+++ src/regexp.js (working copy) |
@@ -343,14 +343,15 @@ |
function RegExpGetRightContext() { |
var start_index; |
- var subject; |
+ var subject, pattern; |
Michael Starzinger
2012/04/12 12:10:28
The "pattern" variable could be moved into the els
|
if (!lastMatchInfoOverride) { |
start_index = lastMatchInfo[CAPTURE1]; |
subject = LAST_SUBJECT(lastMatchInfo); |
} else { |
var override = lastMatchInfoOverride; |
subject = override[override.length - 1]; |
- start_index = override[override.length - 2] + subject.length; |
+ pattern = override[override.length - 3]; |
Lasse Reichstein Nielsen
2012/04/13 06:59:52
I don't think this is correct in all cases.
The o
|
+ start_index = override[override.length - 2] + pattern.length; |
} |
return SubString(subject, start_index, subject.length); |
} |