Support front matter title property override for MD041/first-line-h1 (fixes #53).

This commit is contained in:
David Anson 2017-05-06 15:25:14 -07:00
parent 4ae649c462
commit 942f0600d2
18 changed files with 131 additions and 12 deletions

View file

@ -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": {