All the code boxes are appearing as 1 line to me. This:

#include <stdio.h>

int main()
    printf("Hello, world!\n");
    return 0;

Appears thus:

#include <stdio.h>  int main() {     printf("Hello, world!\n");     return 0; }

...which is making the longer code posts harder to read. Someone posted a binary search tree, which was just impossible to read like that.

It appears correct in the preview as I write this.

Firefox 3.6.3, Gentoo Linux 2.6.32

Edit: To clarify: The correct version (with newlines) appears briefly on both Stack Overflow and Meta, but as soon as syntax highlighting is applied (which is almost instantly), then it collapses to 1 line.

This applies to the editor in the "edit question" part, but it seems to be a bit lazier about applying syntax highlighting. (It seems to do it when the box you type in loses focus, so as I'm typing this, it appears correctly, with no syntax highlighting, and when I un-focus the text area, a few moments later, it syntax highlights and collapses to 1 line.)

  • 1
    Both of the above code segments appear identical to me. (The first I typed with indentation, the latter with none, to mimic the bug I'm seeing.) – Thanatos Jun 7 '10 at 22:38
  • There was a question about this a couple days ago, I think. Let me see if I can find it. – Jon Seigel Jun 7 '10 at 22:39
  • Arghh.. I can't find it. But I know I replied to it in a comment. – Jon Seigel Jun 7 '10 at 22:49
  • 2
    Too bad "user:me" doesn't search comment text. :( – Gnome Jun 7 '10 at 22:50

Got it back to normal. I have no idea why this affects it, but I was using an MSIE 7 User-Agent string. (And this, for some reason, wasn't reset when I started Firefox with -safe-mode...)

A reset of the User-Agent string back to the Firefox default, and a refresh, and it's working properly again.

The exact User-Agent I was using was: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)

Only the MSIE User-Agent causes this: The Netscape and the Opera User-Agent strings work fine.

  • oh, I see, you must have been triggering some IE specific code path in Google Prettify -- basically, as I suspected, an oddball configuration – Jeff Atwood Jun 8 '10 at 2:39

Had a similar issue (in Chrome) which turned out to be an incompatibility with a specific extension (ChromeReload).

I would suggest if your user agent isn't the issue it's worth disabling all extensions to see if it resolves the problem. If it does then you can re-enable one by one to find the culprit.

  • Please name the extension, it's not a shame and would help others. – ShaWiz Oct 16 '13 at 8:55
  • @ShaWizDowArd Added :) – bendataclear Oct 16 '13 at 8:57

We can't reproduce this.

Have you tried in Firefox Safe mode (or another web browser)? I suspect rogue add-in.

  • Restarted in safe mode (webdev toolbar, session manager, and firebug are gone). No change - all code is still one-liner. Here & on SO. – Thanatos Jun 7 '10 at 23:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .