Update MD043/required-headings to support "?" meaning "exactly one unspecified heading" (fixes #475).

This commit is contained in:
David Anson 2025-03-10 21:57:28 -07:00
parent 06b60b7372
commit 5749c8dcf7
15 changed files with 297 additions and 18 deletions

View file

@ -396,7 +396,7 @@ for (const rule of rules) {
"type": "array",
"items": {
"type": "string",
"pattern": "^(\\*|\\+|#{1,6} .*)$"
"pattern": "^(\\*|\\+|\\?|#{1,6}\\s+\\S.*)$"
},
"default": []
},

View file

@ -1201,7 +1201,7 @@
"type": "array",
"items": {
"type": "string",
"pattern": "^(\\*|\\+|#{1,6} .*)$"
"pattern": "^(\\*|\\+|\\?|#{1,6}\\s+\\S.*)$"
},
"default": []
},
@ -1226,7 +1226,7 @@
"type": "array",
"items": {
"type": "string",
"pattern": "^(\\*|\\+|#{1,6} .*)$"
"pattern": "^(\\*|\\+|\\?|#{1,6}\\s+\\S.*)$"
},
"default": []
},

View file

@ -1201,7 +1201,7 @@
"type": "array",
"items": {
"type": "string",
"pattern": "^(\\*|\\+|#{1,6} .*)$"
"pattern": "^(\\*|\\+|\\?|#{1,6}\\s+\\S.*)$"
},
"default": []
},
@ -1226,7 +1226,7 @@
"type": "array",
"items": {
"type": "string",
"pattern": "^(\\*|\\+|#{1,6} .*)$"
"pattern": "^(\\*|\\+|\\?|#{1,6}\\s+\\S.*)$"
},
"default": []
},