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:
parent
93a8489fcf
commit
02796a28d8
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue