mehdisadeghi / react-mathjax-preview

The MathJax React component you were looking for.
https://mehdisadeghi.github.io/react-mathjax-preview/
MIT License
49 stars 30 forks source link

<mspace linebreak="newbreak"> not breaking line in mathml formula #60

Closed udit-compro closed 3 years ago

udit-compro commented 3 years ago

Currently this tag creates a empty whitespace instead of breaking line at the time of rendering the MathML. The MathML is rendering fine if we render it directly using the MathJax library.

udit-compro commented 3 years ago

This issue can be fixed if we add the 'linebreak' attribute in the DOMPurify sanitization object. The current code doesn't support this. However, I have created a PR with the following support. You can check if it's helpful in fixing it. https://github.com/mehdisadeghi/react-mathjax-preview/pull/61