From 9d9fc3d063de979ceede3099c4f2dcce3f9744ec Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Fri, 26 Apr 2013 14:41:42 -0400 Subject: [PATCH] Convert true and fals attributes to booleans. Resolves issue #451. --- unpacked/jax/input/TeX/jax.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/unpacked/jax/input/TeX/jax.js b/unpacked/jax/input/TeX/jax.js index 825751f3d..891abf2bf 100644 --- a/unpacked/jax/input/TeX/jax.js +++ b/unpacked/jax/input/TeX/jax.js @@ -1418,7 +1418,9 @@ if (!match) {TEX.Error("Invalid MathML attribute: "+attr)} if (!MML[type].prototype.defaults[match[1]] && !this.MmlTokenAllow[match[1]]) {TEX.Error(match[1]+" is not a recognized attribute for "+type)} - def[match[1]] = match[2].replace(/^(['"])(.*)\1$/,"$2"); + var value = match[2].replace(/^(['"])(.*)\1$/,"$2"); + if (value === "true") {value = true} else if (value === "false") {value = false} + def[match[1]] = value; def.attrNames.push(match[1]); attr = attr.substr(match[0].length); }