Skip to content

Commit 57d845a

Browse files
committed
Make sure we get the <math> element from mml3 conversion. (mathjax/MathJax#2879)
1 parent 3e6df37 commit 57d845a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ts/input/mathml/mml3/mml3.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,10 @@ export class Mml3<N, T, D> {
7373
const parsed = document.adaptor.parse(Mml3.XSLT, 'text/xml') as any as Node;
7474
processor.importStylesheet(parsed);
7575
this.transform = (node: N) => {
76-
const div = document.adaptor.node('div', {}, [document.adaptor.clone(node)]);
76+
const adaptor = document.adaptor;
77+
const div = adaptor.node('div', {}, [adaptor.clone(node)]);
7778
const mml = processor.transformToDocument(div as any as Node) as any as N;
78-
return document.adaptor.firstChild(mml) as N;
79+
return adaptor.tags(mml, 'math')[0];
7980
};
8081
}
8182
}

0 commit comments

Comments
 (0)