mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Generate Rules.md and md###.md files from metadata, improve Parameters documentation by referencing schema.
This commit is contained in:
parent
32c75ebfd9
commit
37baddcf27
110 changed files with 3875 additions and 179 deletions
46
doc/md024.md
Normal file
46
doc/md024.md
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# MD024 - Multiple headings with the same content
|
||||
|
||||
Tags: headers, headings
|
||||
|
||||
Aliases: no-duplicate-header, no-duplicate-heading
|
||||
|
||||
Parameters:
|
||||
|
||||
* `allow_different_nesting`: Only check sibling headings (`boolean`, default `false`)
|
||||
* `siblings_only`: Only check sibling headings (`boolean`, default `false`)
|
||||
|
||||
This rule is triggered if there are multiple headings in the document that have
|
||||
the same text:
|
||||
|
||||
```markdown
|
||||
# Some text
|
||||
|
||||
## Some text
|
||||
```
|
||||
|
||||
To fix this, ensure that the content of each heading is different:
|
||||
|
||||
```markdown
|
||||
# Some text
|
||||
|
||||
## Some more text
|
||||
```
|
||||
|
||||
If the parameter `siblings_only` (alternatively `allow_different_nesting`) is
|
||||
set to `true`, heading duplication is allowed for non-sibling headings (common
|
||||
in changelogs):
|
||||
|
||||
```markdown
|
||||
# Change log
|
||||
|
||||
## 1.0.0
|
||||
|
||||
### Features
|
||||
|
||||
## 2.0.0
|
||||
|
||||
### Features
|
||||
```
|
||||
|
||||
Rationale: Some Markdown parsers generate anchors for headings based on the
|
||||
heading name; headings with the same content can cause problems with that.
|
||||
Loading…
Add table
Add a link
Reference in a new issue