What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 131 Stack Exchange communities.

While trying to clean up this question I noticed that if you have an itemized list followed immediately by a code block, the four-space indent does not actually indent the code block.


Text used:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

 - item 1
 - item 2
 - item 3

    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
    ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
    in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
    occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit

anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Rendered text:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

  • item 1
  • item 2
  • item 3

    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit

anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.


Note that the block after the itemized list is four-space-indented but doesn't get the nice <pre> block. Folks with edit capabilities can see that the latter is the same as the former, just dedented four spaces.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

That's because you need to use 8 spaces. See http://meta.stackoverflow.com/editing-help

share|improve this answer
    
Hmm, annoying markdown "feature" I guess. I was hoping that putting an extra line break in there would break out of the itemized list but that doesn't seem to do it either. –  Daniel DiPaolo May 20 '10 at 16:24
    
well you can put in something like <!-- space --> to break out of the formatting as well. –  Jeff Atwood May 20 '10 at 17:13

Is the code part of the list?

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

  • item 1
  • item 2
  • item 3

    Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit

anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.


Is the code not part of the list?

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

  • item 1
  • item 2
  • item 3

. <-- put something like a dot or a


Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit

anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

share|improve this answer
1  
Yeah I didn't want to insert a dot there to force the breakout of the list because it's not my post and that's kind of noisy. Same for the <hr>, it seemed unnecessary to break up the post that way. –  Daniel DiPaolo May 20 '10 at 16:27

You must log in to answer this question.

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