Skip to content

Commit b740a3d

Browse files
authored
Merge pull request #53 from mathjax/v2-fixes
V2 fixes
2 parents 003df73 + 3a3f1df commit b740a3d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

mathjax2/legacy/jax/element/MmlNode.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
var MML = MathJax.ElementJax.mml;
33

44
var PROPERTY = [
5+
'texWithDelims',
56
'movesupsub',
67
'subsupOK',
78
'primes',
@@ -12,21 +13,24 @@
1213
'isError',
1314
'multiline',
1415
'variantForm',
15-
'autoOP'
16+
'autoOP',
17+
'fnOP'
1618
];
19+
var RENAME = {
20+
texWithDelims: 'withDelims'
21+
};
1722

1823
MML.mbase.Augment({
1924
toMmlNode: function (factory) {
2025
var kind = this.type;
2126
if (kind === 'texatom') kind = 'TeXAtom';
22-
if (this.inferred) kind = 'inferredMrow';
2327
var node = this.nodeMake(factory, kind);
2428
if ("texClass" in this) node.texClass = this.texClass;
2529
return node;
2630
},
2731
nodeMake: function (factory,kind) {
2832
var node = factory.MML[kind]();
29-
var data = (this.data[0] && this.data[0].inferred ? this.data[0].data : this.data);
33+
var data = (this.data[0] && this.data[0].inferred && this.inferRow ? this.data[0].data : this.data);
3034
for (var i = 0, m = data.length; i < m; i++) {
3135
var child = data[i];
3236
if (child) node.appendChild(child.toMmlNode(factory));
@@ -62,7 +66,7 @@
6266
var name = PROPERTY[i];
6367
if (this[name] != null &&
6468
(this.defaults[name] == null || this.defaults[name] === MML.AUTO)) {
65-
node.setProperty(name, this[name]);
69+
node.setProperty(RENAME[name] || name, this[name]);
6670
}
6771
}
6872
}

0 commit comments

Comments
 (0)