fix: mathjax and mathjax inline syntax fix in regexx

This commit is contained in:
Mehak Nasir
2022-06-06 15:17:00 +05:00
committed by Mehak Nasir
parent 57e1811921
commit b8b01e98e9

View File

@@ -23,9 +23,10 @@ const baseConfig = {
function HTMLLoader({ htmlNode, componentId, cssClassName }) {
const isLatex = htmlNode.match(/(\${1,2})((?:\\.|.)*)\1/)
|| htmlNode.match(/(\[mathjax](.+?)\[\\mathjax])+/)
|| htmlNode.match(/(\[mathjaxinline](.+?)\[\\mathjaxinline])+/)
|| htmlNode.match(/(\\\[(.+?)\\\])+/);
|| htmlNode.match(/(\[mathjax](.+?)\[\/mathjax])+/)
|| htmlNode.match(/(\[mathjaxinline](.+?)\[\/mathjaxinline])+/)
|| htmlNode.match(/(\\\[(.+?)\\\])+/)
|| htmlNode.match(/(\\\((.+?)\\\))+/);
return (
isLatex ? (