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:

    $foo
    $bar
    $baz

and

    $
    foo
    bar
    baz
    $

Note that the [original source of this answer](http://meta.codegolf.stackexchange.com/revisions/ad993d34-af26-4d2e-9866-8df1f2593a81/view-source) does not include any extra indentation, yet the rendered HTML does show it.

According to [a comment by @m0sa, Stack Exchange developer](http://meta.codereview.stackexchange.com/questions/5063/mathjax-breaks-my-indentation#comment10721_5063):

> 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.