I was attempting to edit a post earlier, but couldn't get a code block to display within an ordered list.

I've not found any reference to this directly and despite indenting and trying a few workarounds (` etc), I couldn't get it to work as a code block. Is it possible using SO markdown?:

enter image description here


Just an example to show it:

The way to do it :

  • is to add moar spaces

    This is code (bunch of spaces [8])

    this is not code (4 spaces)

This caused because when the text is in a list, the parser takes a 4 spaces indentation for a normal (list) indentation. So you have to put another 4 spaces in order for it to recognize the code block.

  • 1
    God damn spaces. Thx! – nickhar Apr 17 '13 at 1:06

enter image description here

  • +1 I love the scale of the arrows - Nearly as big as my missing 8 spaces! – nickhar Apr 17 '13 at 1:10
  • 3
    Where are the free-hands drawn stuff? These arrows are way to beautiful to be on the meta! – Hugo Dozois Apr 17 '13 at 1:10
  • @HugoDozois I have a very steady hand. – blahdiblah Apr 17 '13 at 2:20

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