Test value for boolean using toLowerCase()
This commit is contained in:
parent
05c93de747
commit
9b485668e1
|
@ -1418,7 +1418,8 @@
|
||||||
if (!MML[type].prototype.defaults[match[1]] && !this.MmlTokenAllow[match[1]])
|
if (!MML[type].prototype.defaults[match[1]] && !this.MmlTokenAllow[match[1]])
|
||||||
{TEX.Error(match[1]+" is not a recognized attribute for "+type)}
|
{TEX.Error(match[1]+" is not a recognized attribute for "+type)}
|
||||||
var value = match[2].replace(/^(['"])(.*)\1$/,"$2");
|
var value = match[2].replace(/^(['"])(.*)\1$/,"$2");
|
||||||
if (value === "true") {value = true} else if (value === "false") {value = false}
|
if (value.toLowerCase() === "true") {value = true}
|
||||||
|
else if (value.toLowerCase() === "false") {value = false}
|
||||||
def[match[1]] = value;
|
def[match[1]] = value;
|
||||||
def.attrNames.push(match[1]);
|
def.attrNames.push(match[1]);
|
||||||
attr = attr.substr(match[0].length);
|
attr = attr.substr(match[0].length);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user