Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 157 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

Possible Duplicate:
Why is a code block not properly formatted when placed immediately after a list item?

If you look at my post ( 3rd down ) on this stack overflow page, you'll see that my code isn't highlighted. Even though my code is indented by 4 spaces, I had to use the <PRE> tags around my code to get mono-space font. If you take away the surrounding <PRE> tags, the code is interpreted as normal text, even though it is indented.

share|improve this question

marked as duplicate by John Rudy, Ladybug Killer, ChrisF, fretje, Jeff Atwood Jan 6 '10 at 4:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
As Jon notes: this has to do with code following a list item. For more, see meta.stackexchange.com/questions/3327/… – Stephan202 Jan 5 '10 at 20:32
up vote 7 down vote accepted

It was in a list. In a list you have to indent it by 8 spaces.

Rich fixed this by adding a rule before the code, to effectively separate it from the list.

share|improve this answer
    
Thanks for the explanation. Perhaps the behavior of the "Code sample" button could be enhanced to do the 8 space indentation in the context of a list. When I press the "code sample" button it only indents by 4-spaces. – Ross Rogers Jan 5 '10 at 21:35
1  
or better yet, have the "code sample" button always indent 4 spaces on a press, instead of toggling the 4 spaces on or off. then i can press it twice if i need the extra indentation. – quack quixote Jan 6 '10 at 0:32
1  
@~quack - agreed (but there'd need to be an undo button, too). – Jonathan Leffler Jan 6 '10 at 4:37
    
@Jonathan Leffler: isn't that what Ctrl-Z is for? :) but yeah, a separate undo button would be ok. – quack quixote Jan 7 '10 at 10:09

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