mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Update MD024/no-duplicate-heading to allow non-sibling duplicates (fixes #136).
This commit is contained in:
parent
4865301ce9
commit
d76ede1c4f
10 changed files with 246 additions and 15 deletions
|
@ -25,6 +25,7 @@ const schema = {
|
|||
const tags = {};
|
||||
|
||||
// Add rules
|
||||
// eslint-disable-next-line complexity
|
||||
rules.forEach(function forRule(rule) {
|
||||
rule.tags.forEach(function forTag(tag) {
|
||||
const tagRules = tags[tag] || [];
|
||||
|
@ -151,6 +152,20 @@ rules.forEach(function forRule(rule) {
|
|||
}
|
||||
};
|
||||
break;
|
||||
case "MD024":
|
||||
scheme.properties = {
|
||||
"allow_different_nesting": {
|
||||
"description": "Only check sibling headings",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
},
|
||||
"siblings_only": {
|
||||
"description": "Only check sibling headings",
|
||||
"type": "boolean",
|
||||
"default": false
|
||||
}
|
||||
};
|
||||
break;
|
||||
case "MD026":
|
||||
case "MD036":
|
||||
scheme.properties = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue