We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9625089 + be28c06 commit 0ee0d97Copy full SHA for 0ee0d97
extension/src/json-viewer/extract-json.js
@@ -2,8 +2,8 @@ function extractJSON(rawJson) {
2
return rawJson
3
.replace(/\s*while\((1|true)\)\s*;?/, '')
4
.replace(/\s*for\(;;\)\s*;?/, '')
5
- .replace(/^[^{\[].+\({/, '{')
6
- .replace(/}\);?\s*$/, '}');
+ .replace(/^[^{\[].+\(\s?{/, '{')
+ .replace(/}\s?\);?\s*$/, '}');
7
}
8
9
module.exports = extractJSON;
0 commit comments