Fix (#1038): Handle unquoted variables in JSON Lint

Convert unquoted variables in JSON body to 1 in JSON linter. This allows for putting multiple environment/collection variables next to each other and still be unquoted.
This commit is contained in:
n00o 2023-11-26 16:57:31 -05:00
parent fad71e936c
commit 746c5e825e

View File

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