Fix SPLIT routine for IE8 and below (index was wrong for when there are more than one match -- argh!). Resolves issue #623.
This commit is contained in:
parent
126bd1c373
commit
08ba269ccf
|
@ -1135,7 +1135,7 @@ MathJax.Localization = {
|
||||||
var result = [], match, last = 0;
|
var result = [], match, last = 0;
|
||||||
regex.lastIndex = 0;
|
regex.lastIndex = 0;
|
||||||
while (match = regex.exec(string)) {
|
while (match = regex.exec(string)) {
|
||||||
result.push(string.substr(last,match.index));
|
result.push(string.substr(last,match.index-last));
|
||||||
result.push.apply(result,match.slice(1));
|
result.push.apply(result,match.slice(1));
|
||||||
last = match.index + match[0].length;
|
last = match.index + match[0].length;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user