Skip to content

Commit 145604f

Browse files
committed
1行目と2行目の間に改行が2つ以上ある場合のパースエラーを修正
1 parent 2664d5e commit 145604f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/api/chat/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export async function POST(request: NextRequest) {
226226

227227
if (!headerParsed) {
228228
// Wait until we have at least 2 lines (sectionId + title + start of body)
229-
const headerMatch = fullText.match(/^([^\n]*?)\n+([^\n]*?)\n+/);
229+
const headerMatch = fullText.match(/^([^\n]+?)\n+([^\n]+?)\n+/);
230230
if (headerMatch) {
231231
headerParsed = true;
232232
let targetSectionId = headerMatch[1].trim() as SectionId;

0 commit comments

Comments
 (0)