diff --git a/apps/server/src/services/spec-parser.ts b/apps/server/src/services/spec-parser.ts index 811ed925..534c17e2 100644 --- a/apps/server/src/services/spec-parser.ts +++ b/apps/server/src/services/spec-parser.ts @@ -216,7 +216,7 @@ export function extractSummary(text: string): string | null { // Check for ## Summary section (use last match) // Stop at \n## [^#] (same-level headers like "## Changes") but preserve ### subsections // (like "### Root Cause", "### Fix Applied") that belong to the summary content. - const sectionMatches = text.matchAll(/##\s*Summary\s*\n+([\s\S]*?)(?=\n## [^#]|\n\*\*|$)/gi); + const sectionMatches = text.matchAll(/##\s*Summary\s*\n+([\s\S]*?)(?=\n## [^#]|$)/gi); const sectionMatch = getLastMatch(sectionMatches); if (sectionMatch) { const content = sectionMatch[1].trim();