# List formatting breaks when there's an empty line separating them

**URL:** https://meta.discourse.org/t/list-formatting-breaks-when-theres-an-empty-line-separating-them/27912
**Category:** Support
**Created:** [April 24, 2015, 4:36pm UTC](https://meta.discourse.org/t/list-formatting-breaks-when-theres-an-empty-line-separating-them/27912 "2015-04-24T16:36:06Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![JP\_](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jp_/32/115401_2.png) [@JP\_](https://meta.discourse.org/u/JP_)
#### Post date: [April 24, 2015, 4:36pm UTC](https://meta.discourse.org/t/list-formatting-breaks-when-theres-an-empty-line-separating-them/27912/1 "2015-04-24T16:36:07Z")

</div>

I can’t get the raw text to display with \</\> formatting, so [here](https://meta.discourse.org/raw/27912) (might need to open in new window or refresh to see source)

- group A 1
- group A 2
- group A 3
- group A 4
- group A 5

When I try to have two lists separated by an empty line, it throws the whole thing out of whack:

- group A 1

- group A 2

- group B 1

- group B 2

- group B 3

So far, workaround I found is to put empty paragraph in there

- group A 1
- group A 2

- group B 1 - group B 2 - group B 3

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 25, 2015, 1:51am UTC](https://meta.discourse.org/t/list-formatting-breaks-when-theres-an-empty-line-separating-them/27912/2 "2015-04-25T01:51:25Z")

</div>

You generally cannot mix loose and tight spacing of lists in Markdown. Either the list is tight (no spaces) or loose (always spaces). Mixing the two within the same list will result in strangeness.

You should try in Babelmark to see what I mean

> **[John MacFarlane - babelmark 2](https://johnmacfarlane.net/babelmark2/)**
>
> John MacFarlane

Or for more

> **[Maintaining sanity in lists with different kinds of spacing](https://talk.commonmark.org/t/maintaining-sanity-in-lists-with-different-kinds-of-spacing/476/4?u=codinghorror)**
>
> So I am puttering away at my own (PEG-based) markdown implementation, and being very much in tune with the Markdown ideal of producing output which predictably resembles the input, I was all over this. \* a \* b \* c \* d \* e The above...

---

<div class="post-metadata">

### Author: ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)
#### Post date: [April 25, 2015, 10:52am UTC](https://meta.discourse.org/t/list-formatting-breaks-when-theres-an-empty-line-separating-them/27912/3 "2015-04-25T10:52:43Z")

</div>

So it seems common mark is the only one that I feel gets this correct

```plaintext
* List 1, Item 1
* List 1, Item 2
* List 1, Item 3
  
- List 2, Item 1
- List 2, Item 2
- List 2, Item 3

```

Common Mark/Cheapskates output:

 ![](https://global.discourse-cdn.com/meta/original/3X/2/5/25e9715f6dad38826dddd3bf7db6fe9c8e8c629a.png)

Output in Discourse

- List 1, Item 1
- List 1, Item 2
- List 1, Item 3

- List 2, Item 1
- List 2, Item 2
- List 2, Item 3

I haven’t found a way to permit the following in any of the implementations yet:

```plaintext
* List 1, Item 1
* List 1, Item 2
* List 1, Item 3
  
* List 2, Item 1
* List 2, Item 2
* List 2, Item 3

```

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [April 25, 2015, 1:24pm UTC](https://meta.discourse.org/t/list-formatting-breaks-when-theres-an-empty-line-separating-them/27912/4 "2015-04-25T13:24:04Z")

</div>

Hacky, but inserting an HTML br tag seems to work

```plaintext
* List 1, Item 1  
* List 1, Item 2  
* List 1, Item 3  
<br>  
- List 2, Item 1
- List 2, Item 2
- List 2, Item 3

```

- List 1, Item 1
- List 1, Item 2
- List 1, Item 3  
  

- List 2, Item 1
- List 2, Item 2
- List 2, Item 3

---

<div class="post-metadata">

### Author: ![elberet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/elberet/32/122404_2.png) [@elberet](https://meta.discourse.org/u/elberet)
#### Post date: [April 25, 2015, 1:57pm UTC](https://meta.discourse.org/t/list-formatting-breaks-when-theres-an-empty-line-separating-them/27912/5 "2015-04-25T13:57:02Z")

</div>

Except that you really only get a single `<ul>`:

![](https://global.discourse-cdn.com/meta/original/3X/8/3/83f33cb174dc227e02996aedbc33cc041e259f5c.png)

---

<div class="post-metadata">

### Author: ![Mittineague](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mittineague/32/114259_2.png) [@Mittineague](https://meta.discourse.org/u/Mittineague)
#### Post date: [April 25, 2015, 4:58pm UTC](https://meta.discourse.org/t/list-formatting-breaks-when-theres-an-empty-line-separating-them/27912/6 "2015-04-25T16:58:22Z")

</div>

Thanks for catching that. I hadn’t looked at source.  
I hadn’t had my coffee yet - that’s my excuse and I’m sticking with it.

This works better, but is far from being a perfect work-around. i.e. horizontal rule

```plaintext
* item A1
* item A2
* item A3
-----
- item B1
- item B2
- item B3

```

- item A1
- item A2
- item A3

* * *

- item B1
- item B2
- item B3

---

<div class="post-metadata">

### Author: ![JP\_](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jp_/32/115401_2.png) [@JP\_](https://meta.discourse.org/u/JP_)
#### Post date: [April 26, 2015, 8:24pm UTC](https://meta.discourse.org/t/list-formatting-breaks-when-theres-an-empty-line-separating-them/27912/8 "2015-04-26T20:24:17Z")

</div>

> [@codinghorror](#):
>
> You should try in Babelmark to see what I mean

I’m not sure which one Discourse uses, but “pandoc” and a few others seem to get it right.

> **[John MacFarlane - babelmark 2](https://johnmacfarlane.net/babelmark2/?text=+-+waefwefawe%0A+-+rtehergsergser%0A%0A+-+fawefawegaew%0A+-+greagwergawe%0A+-+egawegaewgew)**
>
> John MacFarlane

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [September 29, 2018, 1:03am UTC](https://meta.discourse.org/t/list-formatting-breaks-when-theres-an-empty-line-separating-them/27912/9 "2018-09-29T01:03:39Z")

</div>



---

<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: [September 29, 2018, 2:15am UTC](https://meta.discourse.org/t/list-formatting-breaks-when-theres-an-empty-line-separating-them/27912/10 "2018-09-29T02:15:37Z")

</div>

This is totally resolved with markdown.it which we introduced a year or so ago

---

<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: [September 29, 2018, 2:15am UTC](https://meta.discourse.org/t/list-formatting-breaks-when-theres-an-empty-line-separating-them/27912/11 "2018-09-29T02:15:40Z")

</div>


