3

This question already has an answer here:

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

marked as duplicate by animuson, blahdiblah, hims056, Lucifer, Toon Krijthe Apr 17 '13 at 5:05

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.

4

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
4

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 .