Possible Duplicate:
Code blocks after a list, but not within a list in markdown. Is it possible?

First, this is not the same as discussed here because the use case is slightly different, I don't want the code to be shown as an item in the list.

  1. Anyway, this is the bug I just noticed.
  2. As expected, the list works as it should.

    But having a code block here with multiple lines, I might add doesn't behave as expected.

    I know about the 8 spaces for indentation
    but this is not what I want to have.
  3. But, if I add a single character right after the list wrapped with newlines before and after

  4. (As an example I'm using a comma here)


The code = Block("appears", "just") as expected;
#with ($colors && $everything)
  1. Also note that the numbering of the list keeps going from one to four while I'd expect it to go 1,2 - 1,2 - 1.
  2. In conclusion, seems like code block indented with four spaces isn't considered as a list terminator.
| improve this question | | | | |
  1. Because 4 spaces
    is used to span list over

    paragraphs and lines.

    1. And the list runs from
      1 to 4 since that is how

      a standard <li> works.

  2. These are all described

    in the editing help and
    Markdown reference.

You can cheat with a
pair of <b></b> tags, but it
is an ugly hack.
| improve this answer | | | | |
  • That's unfortunate, because it's not what I want. I think that adding two linefeeds to end the list before the code block should work to get around this. – Esko Apr 11 '10 at 8:41

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