mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Enhance MD022/blanks-around-headings with lines_above/lines_below parameters (fixes #143).
This commit is contained in:
parent
debc08bca1
commit
fa04d29485
24 changed files with 278 additions and 24 deletions
|
|
@ -151,6 +151,20 @@ rules.forEach(function forRule(rule) {
|
|||
}
|
||||
};
|
||||
break;
|
||||
case "MD022":
|
||||
scheme.properties = {
|
||||
"lines_above": {
|
||||
"description": "Blank lines above heading",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
},
|
||||
"lines_below": {
|
||||
"description": "Blank lines below heading",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
}
|
||||
};
|
||||
break;
|
||||
case "MD024":
|
||||
scheme.properties = {
|
||||
"allow_different_nesting": {
|
||||
|
|
|
|||
|
|
@ -485,18 +485,66 @@
|
|||
},
|
||||
"MD022": {
|
||||
"description": "MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"lines_above": {
|
||||
"description": "Blank lines above heading",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
},
|
||||
"lines_below": {
|
||||
"description": "Blank lines below heading",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"blanks-around-headings": {
|
||||
"description": "MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"lines_above": {
|
||||
"description": "Blank lines above heading",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
},
|
||||
"lines_below": {
|
||||
"description": "Blank lines below heading",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"blanks-around-headers": {
|
||||
"description": "MD022/blanks-around-headings/blanks-around-headers - Headings should be surrounded by blank lines",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"lines_above": {
|
||||
"description": "Blank lines above heading",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
},
|
||||
"lines_below": {
|
||||
"description": "Blank lines below heading",
|
||||
"type": "integer",
|
||||
"default": 1
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"MD023": {
|
||||
"description": "MD023/heading-start-left/header-start-left - Headings must start at the beginning of the line",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue