heading-increment
What it does
Section titled “What it does”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.
Why it matters
Section titled “Why it matters”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.
Example
Section titled “Example”# One
### Three
## Two
#### FourConfiguration
Section titled “Configuration”markdown: lint: rules: heading-increment: warn # off (default), warn, errorEnabled by the presets: markdown/markdownlint.
Suppress one line with sudsy-disable-next-line heading-increment in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| markdownlint | MD001 |
full |