mirror of
https://github.com/usebruno/bruno.git
synced 2025-06-20 11:48:03 +02:00
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:
parent
fad71e936c
commit
746c5e825e
@ -204,7 +204,7 @@ export default class CodeEditor extends React.Component {
|
||||
});
|
||||
};
|
||||
try {
|
||||
jsonlint.parse(stripJsonComments(text));
|
||||
jsonlint.parse(stripJsonComments(text.replace(/(?<!"[^":{]*){{[^}]*}}(?![^"},]*")/g, '1')));
|
||||
} catch (e) {}
|
||||
return found;
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user