mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Add front_matter_title parameter to MD025/single-title/single-h1 (refs #169).
This commit is contained in:
parent
050cbbba82
commit
61d6311a3e
14 changed files with 124 additions and 32 deletions
|
|
@ -40,7 +40,6 @@ rules.forEach(function forRule(rule) {
|
|||
let custom = true;
|
||||
switch (rule.names[0]) {
|
||||
case "MD002":
|
||||
case "MD025":
|
||||
scheme.properties = {
|
||||
"level": {
|
||||
"description": "Heading level",
|
||||
|
|
@ -236,6 +235,7 @@ rules.forEach(function forRule(rule) {
|
|||
}
|
||||
};
|
||||
break;
|
||||
case "MD025":
|
||||
case "MD041":
|
||||
scheme.properties = {
|
||||
"level": {
|
||||
|
|
|
|||
|
|
@ -577,7 +577,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"MD025": {
|
||||
"description": "MD025/single-h1 - Multiple top level headings in the same document",
|
||||
"description": "MD025/single-title/single-h1 - Multiple top level headings in the same document",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -588,12 +588,38 @@
|
|||
"description": "Heading level",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
},
|
||||
"front_matter_title": {
|
||||
"description": "RegExp for matching title in front matter",
|
||||
"type": "string",
|
||||
"default": "^\\s*title\\s*[:=]"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"single-title": {
|
||||
"description": "MD025/single-title/single-h1 - Multiple top level headings in the same document",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"level": {
|
||||
"description": "Heading level",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
},
|
||||
"front_matter_title": {
|
||||
"description": "RegExp for matching title in front matter",
|
||||
"type": "string",
|
||||
"default": "^\\s*title\\s*[:=]"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"single-h1": {
|
||||
"description": "MD025/single-h1 - Multiple top level headings in the same document",
|
||||
"description": "MD025/single-title/single-h1 - Multiple top level headings in the same document",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -604,6 +630,11 @@
|
|||
"description": "Heading level",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
},
|
||||
"front_matter_title": {
|
||||
"description": "RegExp for matching title in front matter",
|
||||
"type": "string",
|
||||
"default": "^\\s*title\\s*[:=]"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
|
|
@ -955,7 +986,28 @@
|
|||
"default": true
|
||||
},
|
||||
"MD041": {
|
||||
"description": "MD041/first-line-h1 - First line in file should be a top level heading",
|
||||
"description": "MD041/first-line-heading/first-line-h1 - First line in file should be a top level heading",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"level": {
|
||||
"description": "Heading level",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
},
|
||||
"front_matter_title": {
|
||||
"description": "RegExp for matching title in front matter",
|
||||
"type": "string",
|
||||
"default": "^\\s*title\\s*[:=]"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"first-line-heading": {
|
||||
"description": "MD041/first-line-heading/first-line-h1 - First line in file should be a top level heading",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
@ -976,7 +1028,7 @@
|
|||
"additionalProperties": false
|
||||
},
|
||||
"first-line-h1": {
|
||||
"description": "MD041/first-line-h1 - First line in file should be a top level heading",
|
||||
"description": "MD041/first-line-heading/first-line-h1 - First line in file should be a top level heading",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue