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?

The 4 space indent is not being recognized as a code block after a numbered list.

See below for example:

  1. Make waffle batter
  2. Cook for 6 to 8 weeks
  3. Feed to unicorn

    public void EatWaffles(Unicorn unicorn) { if (unicorn.LikesWaffles) { // do something } }

First saw the problem on this SO answer. I forced the code highlighting on that answer using <pre><code>...</code></pre>, but I think this is probably a problem that should be fixed.

share|improve this question

marked as duplicate by John Rudy, YOU, Jon Seigel, Jeff Atwood Apr 21 '10 at 5:11

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.

You might want to switch the order of those ending tags. Generally it would be </code></pre> – Tyler Carter Apr 21 '10 at 2:44
@Chacha102: Oops! Since I had to add the &lt; and &gt; to make the tags show, I copied and pasted it but forgot to reverse the order. Thanks! – Zach Johnson Apr 21 '10 at 3:36

Indent your code eight spaces instead of four.

  • I
  • Am
  • a
  • List!

    public class OhLookImAfterAList
        public OhLookImAfterAList()
            Console.WriteLine("Oh Snap!");
share|improve this answer
Hmmm...I wonder if the code formatting button should be modified to add the 8 spaces if the block is just after a list. – Zach Johnson Apr 21 '10 at 3:40

You need to put 8 spaces for that.

share|improve this answer

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