The problem should only occur when Prettify kicks in, because when that happens the literal newlines are replaced in the DOM with
<br> elements (which IE doesn't respect in this case, for whatever reason). From a quick test, since the code is inside of a
<pre> anyway, not replacing the newlines seems to work consistently across browsers (IE8/9, Firefox 3.6/4, Chrome 11/13, Safari 5, Opera 11) so long as you don't include the
I think that Prettify is responsible for this swap in the first place, so preventing it might be problematic. However, it might be possible to add in a post-processing hook that undoes this operation. I'll look into that later to see what might be involved and to verify that this won't cause any other issues.
Edit: It seems that this issue was already well-documented, so the real question as waiwai993 points out is what caused the regression?