Skip to content

Commit d74f383

Browse files
authored
Merge pull request #815 from mathjax/fix-parent
Properly set parent for newly created mtd
2 parents 122eedf + bf23b28 commit d74f383

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

ts/input/tex/ParseUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ namespace ParseUtil {
549549
options.addNode(n.kind, n);
550550
const lists = (n.getProperty('in-lists') as string || '').split(/,/);
551551
for (const list of lists) {
552-
options.addNode(list, n);
552+
list && options.addNode(list, n);
553553
}
554554
});
555555
return tree;

ts/input/tex/empheq/EmpheqUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export const EmpheqUtil = {
152152
for (const row of table.childNodes.slice(0).reverse()) {
153153
mtd = parser.create('node', 'mtd');
154154
row.childNodes.unshift(mtd);
155-
row.replaceChild(mtd, mtd); // make sure parent is set
155+
mtd.parent = row;
156156
if (row.isKind('mlabeledtr')) {
157157
row.childNodes[0] = row.childNodes[1];
158158
row.childNodes[1] = mtd;

0 commit comments

Comments
 (0)