From 08ba269ccf437c7280c32bafab56843d0c3727e0 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Wed, 12 Feb 2014 16:05:20 -0500 Subject: [PATCH] Fix SPLIT routine for IE8 and below (index was wrong for when there are more than one match -- argh!). Resolves issue #623. --- unpacked/MathJax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unpacked/MathJax.js b/unpacked/MathJax.js index 28753502e..9ac3bf82c 100644 --- a/unpacked/MathJax.js +++ b/unpacked/MathJax.js @@ -1135,7 +1135,7 @@ MathJax.Localization = { var result = [], match, last = 0; regex.lastIndex = 0; 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)); last = match.index + match[0].length; }