Update MD051/link-fragments to add the ignored_pattern configuration parameter (fixes #547).

This commit is contained in:
David Anson 2025-04-05 22:34:54 -07:00
parent 45932c7837
commit 02478d24cf
17 changed files with 297 additions and 4 deletions

View file

@ -268,7 +268,9 @@
// MD051/link-fragments : Link fragments should be valid : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md051.md
"MD051": {
// Ignore case of fragments
"ignore_case": false
"ignore_case": false,
// Pattern for ignoring additional fragments
"ignored_pattern": ""
},
// MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md052.md

View file

@ -242,6 +242,8 @@ MD050:
MD051:
# Ignore case of fragments
ignore_case: false
# Pattern for ignoring additional fragments
ignored_pattern: ""
# MD052/reference-links-images : Reference links and images should use a label that is defined : https://github.com/DavidAnson/markdownlint/blob/v0.37.4/doc/md052.md
MD052:

View file

@ -483,6 +483,11 @@ for (const rule of rules) {
"description": "Ignore case of fragments",
"type": "boolean",
"default": false
},
"ignored_pattern": {
"description": "Pattern for ignoring additional fragments",
"type": "string",
"default": ""
}
};
break;

View file

@ -1511,6 +1511,11 @@
"description": "Ignore case of fragments",
"type": "boolean",
"default": false
},
"ignored_pattern": {
"description": "Pattern for ignoring additional fragments",
"type": "string",
"default": ""
}
},
"additionalProperties": false
@ -1527,6 +1532,11 @@
"description": "Ignore case of fragments",
"type": "boolean",
"default": false
},
"ignored_pattern": {
"description": "Pattern for ignoring additional fragments",
"type": "string",
"default": ""
}
},
"additionalProperties": false

View file

@ -1511,6 +1511,11 @@
"description": "Ignore case of fragments",
"type": "boolean",
"default": false
},
"ignored_pattern": {
"description": "Pattern for ignoring additional fragments",
"type": "string",
"default": ""
}
},
"additionalProperties": false
@ -1527,6 +1532,11 @@
"description": "Ignore case of fragments",
"type": "boolean",
"default": false
},
"ignored_pattern": {
"description": "Pattern for ignoring additional fragments",
"type": "string",
"default": ""
}
},
"additionalProperties": false