fix: replace json before js fence (#344)
This commit is contained in:
parent
82e1b65792
commit
aa06cd6fb6
|
|
@ -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*/, "")
|
||||
|
|
|
|||
Loading…
Reference in New Issue