Expand list pattern matching in checklist validation (#135)

Updated the regex to match all list patterns (e.g., '- ', '* ', '1. ') instead of only checklist items. This allows the workflow to validate indentation for all list types, not just checklists.
This commit is contained in:
Ian Bassi
2026-01-19 11:14:20 -03:00
committed by GitHub
parent ddc2cfedad
commit 324ed14046

View File

@@ -70,9 +70,9 @@ jobs:
lines.forEach((line, index) => {
const lineNum = index + 1;
// Match checklist patterns: "- [ ]", "- [x]", "[number]. [ ]", etc.
const checklistPattern = /^(\s*)(?:[-*]|\d+\.)\s+\[[\sx]\]/;
const match = line.match(checklistPattern);
// Match ALL list patterns: "- ", "* ", "[number]. "
const listPattern = /^(\s*)(?:[-*]|\d+\.)\s+/;
const match = line.match(listPattern);
if (match) {
const indentation = match[1].length;