MDS002: heading-style
Heading style must be consistent.
# Settings
| Setting | Type | Default | Description |
|---|---|---|---|
style | string | "atx" | "atx" (# Heading) or "setext" (underline with ===/---) |
# Config
Enable (default):
rules:
heading-style:
style: atxDisable:
rules:
heading-style: falseCustom (setext style):
rules:
heading-style:
style: setext# Examples
#
Bad (when style is atx)
Setext heading used when ATX is required:
# Title
Section
-------Setext heading with marker:
# Title
Section
-------
<?allow-empty-section?>#
Bad (when style is setext)
ATX heading used when Setext is required:
# Title
## Section#
Good (when style is atx)
# Title
## Section
Body text.#
Good (when style is setext)
Title
=====
Section
-------
Body text.# Diagnostics
| Message | Condition |
|---|---|
heading style should be atx | style: atx and a Setext heading is found |
heading style should be setext | style: setext and an ATX heading is found |
# Meta-Information
- ID: MDS002
- Name:
heading-style - Status: ready
- Default: enabled, style: atx
- Fixable: yes
- Implementation: source
- Category: heading
- markdownlint: MD003 (heading-style)
- rumdl: MD003 (heading-style)
- mado: MD003 (heading-style)
- gomarklint: no-setext-headings