Skip to content

Commit 1d4b285

Browse files
committed
Fix problem with \left...\right where inferred mrows would be incorrectly inserted around the content of the delimiters. Resolves issue #1829.
1 parent 5f707a2 commit 1d4b285

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

unpacked/jax/input/TeX/jax.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2285,8 +2285,14 @@
22852285
fenced: function (open,mml,close) {
22862286
var mrow = MML.mrow().With({open:open, close:close, texClass:MML.TEXCLASS.INNER});
22872287
mrow.Append(
2288-
MML.mo(open).With({fence:true, stretchy:true, symmetric:true, texClass:MML.TEXCLASS.OPEN}),
2289-
mml,
2288+
MML.mo(open).With({fence:true, stretchy:true, symmetric:true, texClass:MML.TEXCLASS.OPEN})
2289+
);
2290+
if (mml.type === "mrow" && mml.inferred) {
2291+
mrow.Append.apply(mrow, mml.data);
2292+
} else {
2293+
mrow.Append(mml);
2294+
}
2295+
mrow.Append(
22902296
MML.mo(close).With({fence:true, stretchy:true, symmetric:true, texClass:MML.TEXCLASS.CLOSE})
22912297
);
22922298
return mrow;

0 commit comments

Comments
 (0)