# Tightness and looseness of nested lists

**URL:** <https://talk.commonmark.org/t/tightness-and-looseness-of-nested-lists/4622>\
**Category:** Spec\
**Created:** [March 1, 2024, 9:55pm UTC](https://talk.commonmark.org/t/tightness-and-looseness-of-nested-lists/4622 "2024-03-01T21:55:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![notriddle](https://cdn.commonmark.org/user_avatar/talk.commonmark.org/notriddle/32/1237_2.png) [@notriddle](https://talk.commonmark.org/u/notriddle)\
**Post date:** [March 1, 2024, 9:55pm UTC](https://talk.commonmark.org/t/tightness-and-looseness-of-nested-lists/4622/1 "2024-03-01T21:55:25Z")

</div>

```markdown
+ Is this wrapping list tight, or loose?
  * This nested list is definitely tight.
  -

  -

```

In the above example, there’s at least three lists. The outermost `+`-based one, the definitely-tight `*`-based one, and the `-`-based list(s).

- commonmark.js thinks the `+`-based list is tight. The `*` list is tight, and the `-` list is loose (and it stays loose, even if there’s text in one or both items).

- pulldown-cmark thinks the `+`-based list is tight, and agrees with commonmark.js on the nested lists, too.

- commonmark-hs thinks the `+`-based list is loose, unless there’s text after the first `-`, at which it becomes tight (the `+` list remains loose, even when there’s text after the second `-`)

- Markdown-it thinks [there’s two `-`-based lists](https://markdown-it.github.io/#md3=%7B%22source%22%3A%22%2B%20Is%20this%20wrapping%20list%20tight%2C%20or%20loose%3F%5Cn%20%20%2A%20This%20nested%20list%20is%20definitely%20tight.%5Cn%20%20-%5Cn%5Cn%5Cn%20%20-%5Cn%5Cn%22%2C%22defaults%22%3A%7B%22html%22%3Afalse%2C%22xhtmlOut%22%3Afalse%2C%22breaks%22%3Afalse%2C%22langPrefix%22%3A%22language-%22%2C%22linkify%22%3Atrue%2C%22typographer%22%3Atrue%2C%22_highlight%22%3Atrue%2C%22_strict%22%3Atrue%2C%22_view%22%3A%22src%22%7D%7D). The `+`-based list is loose, but, like commonmark-hs, becomes tight if text is put after the first `-`.

- Goldmark, which I tested by running Hugo, does this:

I’ve also filed an issue at [[fuzz result] counterintuitive list tightness · Issue #144 · jgm/commonmark-hs · GitHub](https://github.com/jgm/commonmark-hs/issues/144)
