fix(3599): treat prefixed phase headings as section boundaries

This commit is contained in:
Tom Boucher
2026-05-15 22:40:18 -04:00
parent 2336c27141
commit ab51253370

View File

@@ -94,7 +94,7 @@ function searchPhaseInContent(content, escapedPhase, phaseNum) {
// Find the end of this section (next ## or ### phase header, or end of file)
const restOfContent = content.slice(headerIndex);
const nextHeaderMatch = restOfContent.match(/\n#{2,4}\s+Phase\s+\d/i);
const nextHeaderMatch = restOfContent.match(/\n#{2,4}\s+Phase\s+[\w][\w.-]*/i);
const sectionEnd = nextHeaderMatch
? headerIndex + nextHeaderMatch.index
: content.length;