mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-16 14:00:13 +01:00
Implement rule MD046/code-block-style from Ruby version.
This commit is contained in:
parent
c45eead5d7
commit
0af999e218
24 changed files with 236 additions and 19 deletions
|
|
@ -306,6 +306,20 @@ rules.forEach(function forRule(rule) {
|
|||
}
|
||||
};
|
||||
break;
|
||||
case "MD046":
|
||||
scheme.properties = {
|
||||
"style": {
|
||||
"description": "Block style",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"consistent",
|
||||
"fenced",
|
||||
"indented"
|
||||
],
|
||||
"default": "consistent"
|
||||
}
|
||||
};
|
||||
break;
|
||||
default:
|
||||
custom = false;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1255,6 +1255,48 @@
|
|||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
"MD046": {
|
||||
"description": "MD046/code-block-style - Code block style",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"style": {
|
||||
"description": "Block style",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"consistent",
|
||||
"fenced",
|
||||
"indented"
|
||||
],
|
||||
"default": "consistent"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"code-block-style": {
|
||||
"description": "MD046/code-block-style - Code block style",
|
||||
"type": [
|
||||
"boolean",
|
||||
"object"
|
||||
],
|
||||
"default": true,
|
||||
"properties": {
|
||||
"style": {
|
||||
"description": "Block style",
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"consistent",
|
||||
"fenced",
|
||||
"indented"
|
||||
],
|
||||
"default": "consistent"
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"headings": {
|
||||
"description": "headings - MD001, MD002, MD003, MD018, MD019, MD020, MD021, MD022, MD023, MD024, MD025, MD026, MD036, MD041, MD043",
|
||||
"type": "boolean",
|
||||
|
|
@ -1306,7 +1348,7 @@
|
|||
"default": true
|
||||
},
|
||||
"code": {
|
||||
"description": "code - MD014, MD031, MD038, MD040",
|
||||
"description": "code - MD014, MD031, MD038, MD040, MD046",
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue