diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2018-02-19 03:55:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-19 03:55:33 +0800 |
commit | 2905fd625aa35eda0283dea25d3f5133f052d4db (patch) | |
tree | 5cb05058fb37312a98251c2629c51a6140092097 /test | |
parent | 4facd94029f146c7f6e379d4b5a50c18459db768 (diff) | |
download | tracifyjs-2905fd625aa35eda0283dea25d3f5133f052d4db.tar.gz tracifyjs-2905fd625aa35eda0283dea25d3f5133f052d4db.zip |
reduce false positives from labels (#2934)
Diffstat (limited to 'test')
-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 2c2c21a8..d8238668 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\\.]+|"[^"]*"|var [^=;]+|\\/\\/.*|\\/\\*[\\s\\S]*\\*\\/)*(?:$|return(?:;|\\n))/.test(body)) {', + ' if (/^(?:\\s|\\{|\\}|;|[0-9\\.]+|"[^"]*"|\\w+:|var [^=;]+|\\/\\/.*|\\/\\*[\\s\\S]*\\*\\/)*(?:$|return(?:;|\\n))/.test(body)) {', ' body = "";', " } else {", ' body = n + "' + function() { |