Markdown handling of whitespace in lists


(Jason Sachs) #1

Discourse Markdown seems to be quite a bit different than Stackoverflow Markdown and I’m wondering how to format some text properly when it’s in an extended numbered list. Is there any way to create a blank line inside a numbered list element, so that the numbering doesn’t restart?

In Stackoverflow, this markup text:

1. Hickory dickory dock,
   the mouse ran up the clock
   the clock struck one

   the mouse ran down,
   hickory dickory dock.

2. Mary had a little lamb 
   whose fleece was white as snow.

   And everywhere that Mary went the lamb was sure to go.

produces this:


but in Discourse it looks like this:


  1. Hickory dickory dock,
    the mouse ran up the clock
    the clock struck one

    the mouse ran down,
    hickory dickory dock.

  2. Mary had a little lamb
    whose fleece was white as snow.

    And everywhere that Mary went the lamb was sure to go.



(Jason Sachs) #2

odd, I thought Discourse used CommonMark, which seems to match the StackOverflow behavior.


(Tobias Eigen) #3

Probably unsatisfying, but you can get what you want with <br>, like this:

  1. Hickory dickory dock,
    the mouse ran up the clock
    the clock struck one

    the mouse ran down,
    hickory dickory dock.

  2. Mary had a little lamb
    whose fleece was white as snow.

    And everywhere that Mary went the lamb was sure to go.

Produced with this:

1. Hickory dickory dock,
the mouse ran up the clock
the clock struck one
<br>the mouse ran down,
hickory dickory dock.

2. Mary had a little lamb 
whose fleece was white as snow.
<br> And everywhere that Mary went the lamb was sure to go.

(Jason Sachs) #4

ah – ok, thanks, that’s a good workaround for me.


(David Taylor) #5

Not yet, it’s coming in the next version though :smiley:


(Jeff Atwood) #6

You can’t mix loose and tight lists in Markdown.


(Sam Saffron) #7