Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

This answer is not formatted even though it has 4 spaces identation.

share|improve this question
I've noticed this also. It seems to occur when the code block follows a numbered list. See another example in the question here:… – skaffman Jul 26 '10 at 15:55

public void keyPressed(KeyEvent e) { int keyCode = e.getKeyCode(); switch( keyCode ) { case KeyEvent.VK_UP: // handle up break; case KeyEvent.VK_DOWN: // handle down break; case KeyEvent.VK_LEFT: // handle left break; case KeyEvent.VK_RIGHT : // handle right break; } }

share|improve this answer
Here's what the answer originally looked like. Go to the edit screen to see the broken formatting. – Bill the Lizard Jul 22 '10 at 14:51
It looks right in the preview... – jjnguy Jul 22 '10 at 14:53
I wonder if those spaces aren't you run-of-the-mill space. – jjnguy Jul 22 '10 at 14:54
@jjnguy: Just checked, they're all your standard U+0020 spaces. :/ – Jeremy Banks Oct 28 '11 at 19:10

Weird. It had 5 spaces of indentation and a single empty (except for the indentation) line at the beginning. When I removed those, it fixed the formatting.

share|improve this answer

I don't know what was broken here nor when it got fixed, but it works correctly now (I tried Bill's answer on a dev build, and it renders correctly).

share|improve this answer
Have you forgotten to deploy that change? – genesis Oct 28 '11 at 17:31
What are you talking about? – balpha Oct 28 '11 at 17:34
You said that it look fixed now. It isn'T. – genesis Oct 28 '11 at 17:37
If someone made a dummy edit to Bill's answer, it would be rendered correctly. I just didn't do that to preserve history. – balpha Oct 28 '11 at 17:38
Okay, that seems fair. Sorry for bothering – genesis Oct 28 '11 at 17:39
i can't seem to comment on my answer that you deleted below, so i'll comment here. i just faced the same problem mentioned in this question in an answer i posted on stack overflow. it wouldnt format code which followed a numbered list. i thought my answer below was helpful in that if you follow those steps it fixes the problem of code not being formatted as code when it follows a numbered list. – vikrantislav Oct 28 '11 at 17:45
@vikrantislav: That has nothing to do with this question though, that's why I deleted your answer. For what it's worth, there is a question (actually there are several questions) about your topic as well; see my explanation at… – balpha Oct 28 '11 at 17:57

You must log in to answer this question.

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