Newlines at the end of list items should not yield <br>s

markdown-it-review

(heinrich5991) #1

Newlines in list items are treated no different than normal newlines. This results in

<ul>
<li>Item 1
<li>Item 2
</ul>
  • Item 1
  • Item 2

not being the same as

<ul>
<li>Item 1</li>
<li>Item 2</li>
</ul>
  • Item 1
  • Item 2

The first second results in extraneous space between the list elements, the first one doesn’t. Both contain unnecessary <br>s though, although in the first case they are ignored by the browser.

I get that this is a useful feature outside lists, but it’s not what the user expects inside of lists, a new list item automatically gets a new line – no need to generate <br> in either of the above cases.


(Tomas Ibarra) #2

Is this a real bug that need to be fixed @codinghorror i can work on it if this is the case.


(Sam Saffron) #3

This is not something we are going to look at until we move to the new markdown engine.

- this
- works
  • this
  • works

and

- this 

- works
  • this

  • works


(Tomas Ibarra) #4

Roger that then. I will wait to that, cheers!


(Sam Saffron) #5

Rebaked the OP and all seems a-ok :national_park:

CommonMark testing started here!


(Sam Saffron) #6