Update MD040/fenced-code-language to add language_only parameter to reject extra data in info string.

This commit is contained in:
Sébastien Règne 2022-11-11 07:07:04 +01:00 committed by GitHub
parent 718de432f3
commit 72439f42c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 176 additions and 1 deletions

View file

@ -209,7 +209,9 @@
// MD040/fenced-code-language - Fenced code blocks should have a language specified
"MD040": {
// List of languages
"allowed_languages": []
"allowed_languages": [],
// Require language only
"language_only": false
},
// MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading

View file

@ -191,6 +191,8 @@ MD039: true
MD040:
# List of languages
allowed_languages: []
# Require language only
language_only: false
# MD041/first-line-heading/first-line-h1 - First line in a file should be a top-level heading
MD041:

View file

@ -356,6 +356,11 @@ for (const rule of rules) {
"type": "string"
},
"default": []
},
"language_only": {
"description": "Require language only",
"type": "boolean",
"default": false
}
};
break;

View file

@ -682,6 +682,11 @@
"type": "string"
},
"default": []
},
"language_only": {
"description": "Require language only",
"type": "boolean",
"default": false
}
},
"additionalProperties": false