We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2664d5e commit 145604fCopy full SHA for 145604f
1 file changed
app/api/chat/route.ts
@@ -226,7 +226,7 @@ export async function POST(request: NextRequest) {
226
227
if (!headerParsed) {
228
// Wait until we have at least 2 lines (sectionId + title + start of body)
229
- const headerMatch = fullText.match(/^([^\n]*?)\n+([^\n]*?)\n+/);
+ const headerMatch = fullText.match(/^([^\n]+?)\n+([^\n]+?)\n+/);
230
if (headerMatch) {
231
headerParsed = true;
232
let targetSectionId = headerMatch[1].trim() as SectionId;
0 commit comments