Skip to content

heading-increment

Markdownstyleno fixdefault: offmarkdown/markdownlint

Reports a heading that is more than one level deeper than the heading before it (an h4 right after an h2). Going back up by any number of levels is not reported.

Headings make the outline of the page that screen readers and tables of contents are built from. A skipped level leaves a hole in that outline: a reader who jumps by level finds an h4 with no h3 above it.

To fix, use the missing level, or give the heading the level it has in the outline.

Reported
# One
### Three
## Two
#### Four
markdown:
lint:
rules:
heading-increment: warn # off (default), warn, error

Enabled by the presets: markdown/markdownlint.

Suppress one line with sudsy-disable-next-line heading-increment in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
markdownlint MD001 full