mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
chore: use react-grab to replace code-inspector-plugin (#33078)
This commit is contained in:
10
web/plugins/eslint/utils.js
Normal file
10
web/plugins/eslint/utils.js
Normal file
@ -0,0 +1,10 @@
|
||||
export const cleanJsonText = (text) => {
|
||||
const cleaned = text.replaceAll(/,\s*\}/g, '}')
|
||||
try {
|
||||
JSON.parse(cleaned)
|
||||
return cleaned
|
||||
}
|
||||
catch {
|
||||
return text
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user