Skip to content

Commit 0ee0d97

Browse files
authored
Merge pull request #157 from wednesday/master
Fix the regular expression at the beginning and end of raw jsonp
2 parents 9625089 + be28c06 commit 0ee0d97

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

extension/src/json-viewer/extract-json.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ function extractJSON(rawJson) {
22
return rawJson
33
.replace(/\s*while\((1|true)\)\s*;?/, '')
44
.replace(/\s*for\(;;\)\s*;?/, '')
5-
.replace(/^[^{\[].+\({/, '{')
6-
.replace(/}\);?\s*$/, '}');
5+
.replace(/^[^{\[].+\(\s?{/, '{')
6+
.replace(/}\s?\);?\s*$/, '}');
77
}
88

99
module.exports = extractJSON;

0 commit comments

Comments
 (0)