fix(mathjax): correct regex to match LaTeX expressions

Updated the regular expression pattern to accurately match
LaTeX expressions delimited by $$ instead of single $ symbols.
This resolves incorrect parsing of MathJax content wrapped with
double dollar signs, improving the rendering accuracy in HTML.
This commit is contained in:
Kumi 2024-08-03 15:14:43 +02:00
parent 93a8489fcf
commit 02796a28d8
Signed by: kumi
GPG key ID: ECBCC9082395383F

View file

@ -930,7 +930,7 @@ function convertMathJaxInHTML($html)
}
// Use a regular expression to find LaTeX expressions within the HTML
$pattern = '/\$(.*?)\$/';
$pattern = '/\$\$(.*?)\$\$/';
$callback = function ($matches) {
$latex = $matches[1];
try {