no-duplicate-heading
What it does
Section titled “What it does”Reports a heading whose text is the same as an earlier heading in the document, on the later one, with the first as the related location.
Why it matters
Section titled “Why it matters”Headings that have the same text get the same anchor (the renderer adds a number to the second), so a link to #usage goes to the first one and a reader of the table of contents cannot tell the two apart.
To fix, make the headings different, for example by adding the name of the section they belong to.
Example
Section titled “Example”...
## Install
## Usage
Setext------
Setext======Configuration
Section titled “Configuration”markdown: lint: rules: no-duplicate-heading: warn # off (default), warn, errorEnabled by the presets: markdown/markdownlint.
Suppress one line with sudsy-disable-next-line no-duplicate-heading in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.
| Tool | Rule | Match | What differs |
|---|---|---|---|
| markdownlint | MD024 |
partial | No siblings_only option. |