We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 145604f commit 9a6fd21Copy full SHA for 9a6fd21
1 file changed
app/api/chat/route.ts
@@ -292,7 +292,7 @@ export async function POST(request: NextRequest) {
292
293
// Parse diffs from the full body content
294
const diffRegex =
295
- /<{3,}\s*SEARCH\n([\s\S]*?)\n={3,}\n([\s\S]*?)\n>{3,}\s*REPLACE/g;
+ /<{3,}\s*SEARCH\n*([\s\S]*?)\n*={3,}\n*([\s\S]*?)\n*>{3,}\s*REPLACE/g;
296
const diffRaw: CreateChatDiff[] = [];
297
for (const m of contentAfterHeader.matchAll(diffRegex)) {
298
const search = m[1];
0 commit comments