Possible Duplicate:
Code block is not properly formatted when placed immediately after a list item

When placing code directly after a list. The code is not recognized. See the example below.

- something

    some code

looks like this:

  • something

    some code

should look like this:

  • something
some code
  • This is a dupe, ill find it in a sec. Commented Nov 13, 2009 at 13:10
  • meta.stackexchange.com/questions/3930/… Commented Nov 13, 2009 at 13:11
  • no It's not. The other was about putting code into a list. This is about putting code after a list. The solution there was to put 8 spaces instead of 4 spaces before the code. 8 spaces make the code be part of the list.
    – johannes
    Commented Nov 13, 2009 at 13:14
  • agree, not quite a duplicate, but also something that can be tested at the babelmark.bobtfish.net Commented Nov 13, 2009 at 13:50

1 Answer 1


Yes, if you absolutely, positively must have code RIGHT AFTER a bulleted list, then you need something between the two elements to seperate them. You can use an HTML comment or other non-printable element (say, a  ), like so.

  • item1
  • item2
 this is code
  • 2
    ... or indent it by 8 spaces. Commented Nov 13, 2009 at 14:33
  • Still, why is it not simply possible to provide the functionality of having code format directly after the list item (and not as a part of the list, but starting on the far left) then, without such a workaround here? Is this not a feature-request or bug that is yet to be handled on meta? Commented Sep 2, 2020 at 12:12

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