Skip to content

Commit be28c06

Browse files
committed
Fix the regular expression at the beginning and end of raw jsonp
1 parent e74dcb6 commit be28c06

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

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

0 commit comments

Comments
 (0)