Markdown of code blocks still doesn't work after numbered lists? [duplicate]

Possible Duplicate:
Why do code snippets not work after lists?

When a code block is directly after a list (bullet, or numbered) it doesn't work unless you have 8 spaces:

• bullet

FUNCTION {emphasize} { duplicate$empty$ { pop$"" } { "{\em " swap$ * "}" * } if$} • bullet FUNCTION {emphasize} { duplicate$ empty${ pop$ "" }
{ "{\em " swap$* "}" * } if$
}


The problem is that the {} button is blissfully unaware of this, so if I mark a block of code and press {} it indents the code by 4 spaces (which is not enough if it's after a list item) and if I press it again (as one might hope would work) the indent is removed. For a large block of code it can be quite painful to have to add all these spaces manually. Notice that if you have a nested list item, you'll need 12 spaces!

I hope that either the bug in the markdown can be fixed, or an alternative functionality can be added to make adding all these spaces less painful.

I'll put one such idea as an "answer" so it can be voted on separately..

marked as duplicate by balphaNov 14 '11 at 7:54

• – Martin Scharrer Nov 11 '11 at 8:22
• So this is what almost drove me crazy once; I finally gave up trying to properly format some code block after a list, and asked in chat for help. Thank you for this. – Gonzalo Medina Nov 11 '11 at 16:56
• Yep have had this problem many times, so followign lists, I just add a new line with 'Here is the MWE:' which then works fine. – Peter Grill Nov 11 '11 at 19:17
• THis is indeed a well known "feature" which begs the question: "why doesn't the {} button support it?" – Yossi Farjoun Nov 12 '11 at 4:13

We could have a {+} button to add spaces (4 at a time), and a {-} button to remove them.
FUNCTION {emphasize}
{ duplicate$empty$
{ pop$"" } { "{\em " swap$ * "}" * }