The Latex markdown renderer now correctly parses the terminating $$ delimiter when there is text following it, by parsing for the delimiter in the whole string rather than only looking at the last two characters. For example, this block of markdown code now renders correctly.
THis is the standard deviation formula:
$$
\sqrt{\frac{1}{N-1} \sum_{i=1}^N (x_i - \overline{x})^2}
$$ {#eq-stddev}
This PR fixes #147043.
The Latex markdown renderer now correctly parses the terminating $$ delimiter when there is text following it, by parsing for the delimiter in the whole string rather than only looking at the last two characters. For example, this block of markdown code now renders correctly.