From aa06cd6fb64c63d47d8c7033e13689f0491cbf33 Mon Sep 17 00:00:00 2001 From: johnny0120 Date: Thu, 26 Jun 2025 08:40:32 +0800 Subject: [PATCH] fix: replace json before js fence (#344) --- web/src/core/utils/json.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/src/core/utils/json.ts b/web/src/core/utils/json.ts index b926a9b..aac3456 100644 --- a/web/src/core/utils/json.ts +++ b/web/src/core/utils/json.ts @@ -7,8 +7,8 @@ export function parseJSON(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*/, "")