Skip to content

Commit

Permalink
Fix use if for...in to avoid problems with elements added to Array.pr…
Browse files Browse the repository at this point in the history
…ototype. Resolves issue mathjax#667
  • Loading branch information
dpvc committed Feb 6, 2014
1 parent 67ee149 commit 7bd8f9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unpacked/extensions/TeX/bbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
*/

MathJax.Extension["TeX/bbox"] = {
version: "2.3"
version: "2.3.1"
};

MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
Expand All @@ -61,7 +61,7 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
var bbox = this.GetBrackets(name,""),
math = this.ParseArg(name);
var parts = bbox.split(/,/), def, background, style;
for (var i in parts) {
for (var i = 0, m = parts.length; i < m; i++) {
var part = parts[i].replace(/^\s+/,'').replace(/\s+$/,'');
var match = part.match(/^(\.\d+|\d+(\.\d*)?)(pt|em|ex|mu|px|in|cm|mm)$/);
if (match) {
Expand Down

0 comments on commit 7bd8f9e

Please sign in to comment.