Handle mode='display' attribute on math elements properly, now that is has been moved to a separate attr property internally
This commit is contained in:
parent
81c9070044
commit
49e7bc5e9e
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -37,9 +37,15 @@ MathJax.ElementJax.mml.Augment({
|
|||
Init: function () {
|
||||
if (arguments.length === 1 && arguments[0].type === "math") {this.root = arguments[0]}
|
||||
else {this.root = MathJax.ElementJax.mml.math.apply(this,arguments)}
|
||||
if (this.root.mode) {
|
||||
if (!this.root.display && this.root.mode === "display") {this.root.display = "block"}
|
||||
delete this.root.mode;
|
||||
if (this.root.attr && this.root.attr.mode) {
|
||||
if (!this.root.display && this.root.attr.mode === "display") {
|
||||
this.root.display = "block";
|
||||
this.root.attrNames.push("display");
|
||||
}
|
||||
delete this.root.attr.mode;
|
||||
for (var i = 0, m = this.root.attrNames.length; i < m; i++) {
|
||||
if (this.root.attrNames[i] === "mode") {this.root.attrNames.splice(i,1); break}
|
||||
}
|
||||
}
|
||||
}
|
||||
},{
|
||||
|
|
Loading…
Reference in New Issue
Block a user