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

**URL:** <https://meta.discourse.org/t/newlines-at-the-end-of-list-items-should-not-yield-br-s/31109>\
**Category:** Bug\
**Tags:** markdown-it-review\
**Created:** [2015年七月16日 13:41 UTC](https://meta.discourse.org/t/newlines-at-the-end-of-list-items-should-not-yield-br-s/31109 "2015-07-16T13:41:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![heinrich5991](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heinrich5991/32/114586_2.png) [@heinrich5991](https://meta.discourse.org/u/heinrich5991)\
**Post date:** [2015年七月16日 13:41 UTC](https://meta.discourse.org/t/newlines-at-the-end-of-list-items-should-not-yield-br-s/31109/1 "2015-07-16T13:41:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![tibarra](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tibarra/32/52222_2.png) [@tibarra](https://meta.discourse.org/u/tibarra)\
**Post date:** [2016年三月16日 21:05 UTC](https://meta.discourse.org/t/newlines-at-the-end-of-list-items-should-not-yield-br-s/31109/2 "2016-03-16T21:05:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2016年三月16日 21:09 UTC](https://meta.discourse.org/t/newlines-at-the-end-of-list-items-should-not-yield-br-s/31109/3 "2016-03-16T21:09:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tibarra](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tibarra/32/52222_2.png) [@tibarra](https://meta.discourse.org/u/tibarra)\
**Post date:** [2016年三月16日 21:12 UTC](https://meta.discourse.org/t/newlines-at-the-end-of-list-items-should-not-yield-br-s/31109/4 "2016-03-16T21:12:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2017年六月26日 14:07 UTC](https://meta.discourse.org/t/newlines-at-the-end-of-list-items-should-not-yield-br-s/31109/5 "2017-06-26T14:07:15Z")

</div>

Rebaked the OP and all seems a-ok 🏞

[CommonMark testing started here!](https://meta.discourse.org/t/commonmark-testing-started-here/65121)

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [2017年六月26日 14:07 UTC](https://meta.discourse.org/t/newlines-at-the-end-of-list-items-should-not-yield-br-s/31109/6 "2017-06-26T14:07:20Z")

</div>


