# Setext headers and empty list items

**URL:** <https://talk.commonmark.org/t/setext-headers-and-empty-list-items/1173>\
**Category:** Spec\
**Created:** [April 30, 2015, 8:34pm UTC](https://talk.commonmark.org/t/setext-headers-and-empty-list-items/1173 "2015-04-30T20:34:30Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![douginamug](https://talk.commonmark.org/user_avatar/talk.commonmark.org/douginamug/32/2284_2.png) [@douginamug](https://talk.commonmark.org/u/douginamug)\
**Post date:** [July 17, 2021, 1:54pm UTC](https://talk.commonmark.org/t/setext-headers-and-empty-list-items/1173/14 "2021-07-17T13:54:56Z")

</div>

Hello all! I hope bumping this thread is the right thing to do, despite its age, since it’s the exact topic I wanted to bring up 🙇‍♂️

I recently opened an [issue on Hedgedoc](https://github.com/hedgedoc/hedgedoc/issues/1441#issuecomment-878598241) about this _‘empty, hyphenated list-item Vs. h2 setext’_ issue. The maintainer also initially thought it was a problem on their side, but then realized it was conformant with commonmark, so opened an [issue on Commonmark](https://github.com/commonmark/commonmark.js/issues/222).

The argument for setext only requiring one `-` or `=` for single-character titles does make sense. However, the argument for setext requiring multiple `-` or `=` is that it would solve the list/header issue, and would be arguably closer to Gruber’s description:

> Markdown offers two styles of headers: _Setext_ and _atx_. Setext-style headers for `<h1>` and `<h2>` are created by “underlining” with equal sign **s** (`=`) and hyphen **s** (`-`), respectively.

(emphasis added)

This description, which arguably cites multiple `-` or `=`, appears to be backed up with the examples some lines later:

```auto
A First Level Header
====================

A Second Level Header
---------------------

```

In contrast, [Commonmark example 83](https://spec.commonmark.org/0.30/#example-83) states:

> The underlining can be any length

With respective examples of h2 and h1:

```auto
Foo
-------------------------

Foo
=

```

Furthermore, as mentioned in the first post, the [Commonmark 0.30 Specification, 4.3 Setext heading](https://spec.commonmark.org/0.30/#setext-headings) still states:

> If a line containing a single `-` can be interpreted as an empty list items, it should be interpreted this way and not as a setext heading underline.

While it might be argued that…

```auto
Foo
-

```

should still be interpreted as an h2, I believe interpreting…

```auto
- Foo
    -

```

as an h2 is interpretation too far, and goes against the ‘readability’ maxim.

In conclusion, I:

- **generally support** requiring multiple `-` or `=` for setext headers, and
- **strongly support** indented, hyphenated list items not being interpreted as h2 setext header underlines for parent list items.

---

_[View the full topic](https://talk.commonmark.org/t/setext-headers-and-empty-list-items/1173)._
