aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2018-02-19 03:55:33 +0800
committerGitHub <noreply@github.com>2018-02-19 03:55:33 +0800
commit2905fd625aa35eda0283dea25d3f5133f052d4db (patch)
tree5cb05058fb37312a98251c2629c51a6140092097 /test
parent4facd94029f146c7f6e379d4b5a50c18459db768 (diff)
downloadtracifyjs-2905fd625aa35eda0283dea25d3f5133f052d4db.tar.gz
tracifyjs-2905fd625aa35eda0283dea25d3f5133f052d4db.zip
reduce false positives from labels (#2934)
Diffstat (limited to 'test')
-rw-r--r--test/sandbox.js2
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() {