mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-09-22 05:40:48 +02:00
Support front matter title property override for MD041/first-line-h1 (fixes #53).
This commit is contained in:
parent
4ae649c462
commit
942f0600d2
18 changed files with 131 additions and 12 deletions
|
@ -35,7 +35,6 @@ rules.forEach(function forRule(rule) {
|
|||
switch (rule.name) {
|
||||
case "MD002":
|
||||
case "MD025":
|
||||
case "MD041":
|
||||
scheme.properties = {
|
||||
"level": {
|
||||
"description": "Header level",
|
||||
|
@ -205,6 +204,20 @@ rules.forEach(function forRule(rule) {
|
|||
}
|
||||
};
|
||||
break;
|
||||
case "MD041":
|
||||
scheme.properties = {
|
||||
"level": {
|
||||
"description": "Header level",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
},
|
||||
"front_matter_title": {
|
||||
"description": "RegExp for matching title in front matter",
|
||||
"type": "string",
|
||||
"default": "^\\s*title:"
|
||||
}
|
||||
};
|
||||
break;
|
||||
case "MD043":
|
||||
scheme.properties = {
|
||||
"headers": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue