# Bug in rendering math in comments [duplicate]

I recently left a comment here containing the equation $$\sigma(i_1\;i_2\;\cdots\;i_n)\sigma^{-1}=(\sigma(i_1)\;\sigma(i_2)\;\cdots\;\sigma(i_n))$$ but the last $\sigma$ is broken, displaying instead as ${\color{red}\s}\;igma$. There is no space or invisible character seperating the s from igma.

The un-rendered of the comment:

\$\$\sigma(i_1\;i_2\;\cdots\;i_n)\sigma^{-1}=(\sigma(i_1)\;\sigma(i_2)\;\cdots\;\sigma(i_n))\$\$

It seems that if I add spaces around the equals sign, the comment renders correctly. Perhaps there is some length restriction on the parser that handles comments?

• Illustration: $$\sigma(i_1\;i_2\;\cdots\;i_n)\sigma^{-1}=(\sigma(i_1)\;\sigma(i_2)\;\cdots\;\sigma(i_n))$$ Apr 14 '14 at 1:14
• Adding spaces around equals sign: $$\sigma(i_1\;i_2\;\cdots\;i_n)\sigma^{-1} = (\sigma(i_1)\;\sigma(i_2)\;\cdots\;\sigma(i_n))$$ Apr 14 '14 at 1:15
• This is definitely a duplicate.
– Asaf Karagila Mod
Apr 14 '14 at 2:00
• @AsafKaragila Found it. Apr 14 '14 at 2:04

This is StackExchange™ WhiteSpace EnforcementOfficer™ at work. Looking at the HTML source of the page, you'll see \s&zwnj;&#8203;igma there:
@abe15 The key is to know that $$\sigma(i_1\;i_2\;\cdots\;i_n)\sigma^{-1}=(\sigma(i_1)\;\sigma(i_2)\;\cdots\;\s&zwnj;&#8203;igma(i_n))$$

Inserting a space in LaTeX markup eliminates the (perceived) need for inserting &zwnj;&#8203;.
• @AlexBecker The most logical way is probably to configure MathJax on SE to perform pre-parsing string replacement such as &zwnj;&#8203; $\to$ empty string (and &amp; $\to$ &, to fix another issue). If this is done via parameters in the MathJax configuration script, the effect would be neatly localized to SE. I don't think introducing support for such parameters would be too much work for MathJax team, considering that SE is one of five Partners, with annual support level of \$20,000. Apr 14 '14 at 1:58