5
\$\begingroup\$

On this question, I found that when I tried to edit the question and add a numbered list format, it sucked in the code formatting that followed, so I had to add Code: after the list to show the numbered list that I wanted to close it. This allowed the code formatting to start fresh.

\$\endgroup\$
1
  • \$\begingroup\$ I don't know if this happens in any of the other Stack Sites so I posted it here rather than the Stack Exchange Meta \$\endgroup\$
    – Malachi
    Commented Oct 2, 2013 at 15:53

1 Answer 1

8
\$\begingroup\$

This behaviour is the same on all Stack Exchange sites, and it is documented in the editing help. A list item continues until a line is reached that has no indent. This allows you to have multiple paragraphs, quoted text, and code blocks inside a list item.

If you want to follow a numbered list by a code block (without the code block becoming part of the list item), put an HTML comment after the list and before the code block, like this:

1. numbered list
1. numbered list

<!-- comment here -->

    code block
    code block
\$\endgroup\$
2
  • \$\begingroup\$ thank you for that insight \$\endgroup\$
    – Malachi
    Commented Oct 2, 2013 at 17:55
  • 3
    \$\begingroup\$ I did not know about this! Thanks. +1 \$\endgroup\$
    – Jamal
    Commented Oct 2, 2013 at 23:51

You must log in to answer this question.

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