Skip to content

Commit

Permalink
Make sure we get the <math> element from mml3 conversion. (mathjax/Ma…
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed Jun 2, 2022
1 parent 3e6df37 commit 57d845a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ts/input/mathml/mml3/mml3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ export class Mml3<N, T, D> {
const parsed = document.adaptor.parse(Mml3.XSLT, 'text/xml') as any as Node;
processor.importStylesheet(parsed);
this.transform = (node: N) => {
const div = document.adaptor.node('div', {}, [document.adaptor.clone(node)]);
const adaptor = document.adaptor;
const div = adaptor.node('div', {}, [adaptor.clone(node)]);
const mml = processor.transformToDocument(div as any as Node) as any as N;
return document.adaptor.firstChild(mml) as N;
return adaptor.tags(mml, 'math')[0];
};
}
}
Expand Down

0 comments on commit 57d845a

Please sign in to comment.