www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit b33ed4c54bacab96aae45e2f78ae20046f27bbad
parent 3ca32dc64b3477875709c0a0f5f2ed3ee0b75c40
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Tue, 19 Aug 2014 13:35:11 -0400

Update use of RegExp.$n to account for Firefoxs change from empty string to undefined for unmatched groups. Resolves issue #891.

Diffstat:
Munpacked/extensions/toMathML.js | 2+-
Munpacked/jax/output/HTML-CSS/autoload/mtable.js | 2+-
Munpacked/jax/output/NativeMML/jax.js | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/unpacked/extensions/toMathML.js b/unpacked/extensions/toMathML.js @@ -91,7 +91,7 @@ MathJax.Hub.Register.LoadHook("[MathJax]/jax/element/mml/jax.js",function () { if (typeof(value) === "string" && value.replace(/ /g,"").match(/^(([-+])?(\d+(\.\d*)?|\.\d+))mu$/)) { // FIXME: should take scriptlevel into account - return RegExp.$2+((1/18)*RegExp.$3).toFixed(3).replace(/\.?0+$/,"")+"em"; + return (RegExp.$2||"")+((1/18)*RegExp.$3).toFixed(3).replace(/\.?0+$/,"")+"em"; } else if (this.toMathMLvariants[value]) {return this.toMathMLvariants[value]} return this.toMathMLquote(value); diff --git a/unpacked/jax/output/HTML-CSS/autoload/mtable.js b/unpacked/jax/output/HTML-CSS/autoload/mtable.js @@ -167,7 +167,7 @@ MathJax.Hub.Register.StartupHook("HTML-CSS Jax Ready",function () { var Y, fY, n = ""; if (typeof(values.align) !== "string") {values.align = String(values.align)} if (values.align.match(/(top|bottom|center|baseline|axis)( +(-?\d+))?/)) - {n = RegExp.$3; values.align = RegExp.$1} else {values.align = this.defaults.align} + {n = RegExp.$3||""; values.align = RegExp.$1} else {values.align = this.defaults.align} if (n !== "") { // // Find the height of the given row diff --git a/unpacked/jax/output/NativeMML/jax.js b/unpacked/jax/output/NativeMML/jax.js @@ -518,7 +518,7 @@ value = String(value); if (nMML.NAMEDSPACE[value]) {value = nMML.NAMEDSPACE[value]} // MP doesn't do negative spaces else if (value.match(/^\s*(([-+])?(\d+(\.\d*)?|\.\d+))\s*mu\s*$/)) - {value = RegExp.$2+((1/18)*RegExp.$3).toFixed(3).replace(/\.?0+$/,"")+"em"} // FIXME: should take scriptlevel into account + {value = (RegExp.$2||"")+((1/18)*RegExp.$3).toFixed(3).replace(/\.?0+$/,"")+"em"} // FIXME: should take scriptlevel into account else if (this.NativeMMLvariants[value]) {value = this.NativeMMLvariants[value]} return value; },