This is a MathJax-related issue. Here are some very short snippets that reproduce the bug, which appears to occur whenever multiple dollar signs are placed in a single code block:




Note that the [original source of this answer]( does not include any extra indentation, yet the rendered HTML does show it.

According to [a comment by @m0sa, Stack Exchange developer](

> I looked into it, turned out to be a deep rabbit hole requiring at major refactoring of MarkdownSharp (we'd need to make the pipeline extensible, so we could inject stuff before DoCodeBlocks in RunBlockGamut - currently all the processing happens before we ever hit MarkdownSharp, but we'd need to leverage it's block processing)

So, it's unlikely that this will be fixed any time soon (ugh).

Unfortunately, the answer is just "use `jQuery` or some other alias in your code instead of `$`" until this is fixed.