mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-03 06:12:14 +08:00
fix: replace json before js fence (#344)
This commit is contained in:
@@ -7,8 +7,8 @@ export function parseJSON<T>(json: string | null | undefined, fallback: T) {
|
||||
try {
|
||||
const raw = json
|
||||
.trim()
|
||||
.replace(/^```js\s*/, "")
|
||||
.replace(/^```json\s*/, "")
|
||||
.replace(/^```js\s*/, "")
|
||||
.replace(/^```ts\s*/, "")
|
||||
.replace(/^```plaintext\s*/, "")
|
||||
.replace(/^```\s*/, "")
|
||||
|
||||
Reference in New Issue
Block a user