diff --git a/web/src/core/utils/json.ts b/web/src/core/utils/json.ts index 35e00b0..b926a9b 100644 --- a/web/src/core/utils/json.ts +++ b/web/src/core/utils/json.ts @@ -7,7 +7,10 @@ export function parseJSON(json: string | null | undefined, fallback: T) { try { const raw = json .trim() + .replace(/^```js\s*/, "") .replace(/^```json\s*/, "") + .replace(/^```ts\s*/, "") + .replace(/^```plaintext\s*/, "") .replace(/^```\s*/, "") .replace(/\s*```$/, ""); return parse(raw) as T;