MathJax
MathJax copied to clipboard
Latex comment after "\end{equation}" ignored.
Issue Summary
Using your demo with this piece of code:
\begin{equation} % arbitrary environments,
x=\sqrt{b} % even tables, figures
\end{equation} % etc
Is rendered like this:
You see the "lost" % etc after the equation?
Technical details:
Your demo with current Firefox from latest Debian 11.
MathJax only processes TeX that is within math delimiters. In your case, those are the \begin{equation} and \end{equation}, so the % etc is outside of the mathematics, and MathJax does not handle that. It is part of the rest of the HTML document, so follows HTML rules, not TeX rules.
So that is the expected behavior from MathJax.