4

I like to quote instructions and comments from other sites in my answers. A lot of the time, these quotes will have code snippets in them.

Right now the integration for them doesn't look right to me; here is an example. The small code snippets can't exist in the blockquote itself on their own line, and putting them outside of the blockquote restarts the numbering. Another example (hard to see in meta):

Stuff about Raspberry Pi, here's an example:

  1. Point 1
  2. Point 2 with some code

But the code splits up the line numbering :(

  1. Point 3
  2. Point 4 with some more code: I really like the continuous line numbering, but the code isn't on it's own separate line :(
  3. That last point looks weird with the code being part of Point 4

Am I formatting this wrong, or is this a problem with the Markdown compilation?

1
  • It looks like this is a limitation of this particular markdown implementation.
    – Jivings Mod
    Commented Nov 25, 2013 at 23:38

1 Answer 1

6

Two things:

  1. Any time you need to put multiple paragraphs under a single list item, just indent each paragraph after the first by one space to avoid breaking the list.

    Like this

  2. If you want a code block in a list, indent by eight spaces (don't surround it in backticks). Here's your example, properly formatted:

    Stuff about Raspberry Pi, here's an example:

    1. Point 1
    2. Point 2 with some code

      The code doesn't split the line numbering :)
      
    3. Point 3

    4. Point 4 with some more code: I really like the continuous line numbering, but the code isn't on it's own separate line :(
    5. That last point looks weird with the code being part of Point 4

(and yes, I made your example part of the second list item too, just to show off)

1
  • It's... beautiful!
    – syb0rg
    Commented Nov 27, 2013 at 3:33

You must log in to answer this question.

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