Skip to content

Commit

Permalink
feat(viewer): detect mathml expression with break lines
Browse files Browse the repository at this point in the history
  • Loading branch information
xjiang-at-wiris committed Dec 17, 2024
1 parent 84c482a commit cc1fbf5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/viewer/src/mathml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface FormulaData {
*/
function findSafeMathMLTextNodes(root: HTMLElement): Node[] {
const nodeIterator: NodeIterator = document.createNodeIterator(root, NodeFilter.SHOW_TEXT, (node) =>
/«math(.*?)«\/math»/g.test(node.nodeValue || "") ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT,
/«math([\s\S]*?)«\/math»/g.test(node.nodeValue || "") ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_REJECT,
);
const safeNodes: Node[] = [];

Expand Down

0 comments on commit cc1fbf5

Please sign in to comment.