Update MD052/reference-links-images to add a shortcut_syntax parameter for opting into shortcut scanning (fixes #915).

This commit is contained in:
David Anson 2023-09-04 16:40:48 -07:00
parent a736588958
commit c118c1160a
13 changed files with 433 additions and 29 deletions

View file

@ -279,7 +279,10 @@
"MD051": true,
// MD052/reference-links-images - Reference links and images should use a label that is defined
"MD052": true,
"MD052": {
// Include shortcut syntax
"shortcut_syntax": false
},
// MD053/link-image-reference-definitions - Link and image reference definitions should be needed
"MD053": {

View file

@ -252,7 +252,9 @@ MD050:
MD051: true
# MD052/reference-links-images - Reference links and images should use a label that is defined
MD052: true
MD052:
# Include shortcut syntax
shortcut_syntax: false
# MD053/link-image-reference-definitions - Link and image reference definitions should be needed
MD053:

View file

@ -497,6 +497,15 @@ for (const rule of rules) {
}
};
break;
case "MD052":
scheme.properties = {
"shortcut_syntax": {
"description": "Include shortcut syntax",
"type": "boolean",
"default": false
}
};
break;
case "MD053":
scheme.properties = {
"ignored_definitions": {

View file

@ -937,8 +937,19 @@
},
"MD052": {
"description": "MD052/reference-links-images - Reference links and images should use a label that is defined",
"type": "boolean",
"default": true
"type": [
"boolean",
"object"
],
"default": true,
"properties": {
"shortcut_syntax": {
"description": "Include shortcut syntax",
"type": "boolean",
"default": false
}
},
"additionalProperties": false
},
"reference-links-images": {
"$ref": "#/properties/MD052"