Merge pull request #1062 from n00o/feature/JSON_Handle_Variables

Fix (#1038): Handle unquoted variables in JSON Lint
This commit is contained in:
Anoop M D 2023-11-27 16:57:46 +05:30 committed by GitHub
commit 0e320535a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -204,8 +204,8 @@ export default class CodeEditor extends React.Component {
});
};
try {
jsonlint.parse(stripJsonComments(text));
} catch (e) { }
jsonlint.parse(stripJsonComments(text.replace(/(?<!"[^":{]*){{[^}]*}}(?![^"},]*")/g, '1')));
} catch (e) {}
return found;
});
if (editor) {