diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2018-02-19 06:21:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-19 06:21:07 +0800 |
commit | b5f0f4f3a1eef7792e71938eff1433e24389b56c (patch) | |
tree | 3c9b450e4c43ea0b832afd518eba9de728871eb9 /test/sandbox.js | |
parent | 2905fd625aa35eda0283dea25d3f5133f052d4db (diff) | |
download | tracifyjs-b5f0f4f3a1eef7792e71938eff1433e24389b56c.tar.gz tracifyjs-b5f0f4f3a1eef7792e71938eff1433e24389b56c.zip |
reduce false positives from object literals (#2935)
Diffstat (limited to 'test/sandbox.js')
-rw-r--r-- | test/sandbox.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sandbox.js b/test/sandbox.js index d8238668..b534613d 100644 --- a/test/sandbox.js +++ b/test/sandbox.js @@ -42,7 +42,7 @@ var FUNC_TOSTRING = [ " }", " var body = toString.call(this);", ' body = body.slice(body.indexOf("{") + 1, -1);', - ' if (/^(?:\\s|\\{|\\}|;|[0-9\\.]+|"[^"]*"|\\w+:|var [^=;]+|\\/\\/.*|\\/\\*[\\s\\S]*\\*\\/)*(?:$|return(?:;|\\n))/.test(body)) {', + ' if (/^(?:[\\s{}();,]|[0-9\\.]+|"[^"]*"|\\w+:|var [^=;]+|\\/\\/.*|\\/\\*[\\s\\S]*\\*\\/)*(?:$|return(?:$|;|\\n))/.test(body)) {', ' body = "";', " } else {", ' body = n + "' + function() { |