Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/scripts/agents_pr_meta_update_body.js
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ function parseCheckboxStates(block) {
if (inCodeBlock) {
continue;
}
const match = line.match(/^- \[(x| )\]\s*(.+)$/i);
const match = line.match(/^\s*- \[(x| )\]\s*(.+)$/i);
if (match) {
const checked = match[1].toLowerCase() === 'x';
const text = match[2].trim();
Expand Down Expand Up @@ -461,12 +461,13 @@ function mergeCheckboxStates(newContent, existingStates) {
updated.push(line);
continue;
}
const match = line.match(/^- \[( )\]\s*(.+)$/);
const match = line.match(/^(\s*)- \[( )\]\s*(.+)$/);
if (match) {
const text = match[2].trim();
const indent = match[1];
const text = match[3].trim();
const normalized = text.replace(/^-\s*/, '').trim().toLowerCase();
if (existingStates.has(normalized)) {
updated.push(`- [x] ${text}`);
updated.push(`${indent}- [x] ${text}`);
continue;
}
}
Expand Down
Loading