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

@ -38,6 +38,8 @@ export default {
}
} else if (expected === "+") {
matchAny = true;
} else if (expected === "?") {
// Allow current, match next
} else if (handleCase(expected) === handleCase(actual)) {
matchAny = false;
} else if (matchAny) {