There was an error while loading. Please reload this page.
1 parent 192e0a6 commit f84c549Copy full SHA for f84c549
1 file changed
packages/cli/templates/utils.ts
@@ -149,7 +149,7 @@ export async function generateResponse(
149
export function extractCodeBlock(text: string, language?: string): string | null {
150
const pattern = language
151
? new RegExp(`\`\`\`${language}\\n([\\s\\S]*?)\`\`\``)
152
- : /```[\w]*\n([\s\S]*?)```/;
+ : /```[\w-]*\n([\s\S]*?)```/;
153
const match = text.match(pattern);
154
return match ? match[1].trim() : null;
155
}
0 commit comments