public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4facd94
)
reduce false positives from labels (#2934)
author
Alex Lam S.L
<alexlamsl@gmail.com>
Sun, 18 Feb 2018 19:55:33 +0000
(
03:55
+0800)
committer
GitHub
<noreply@github.com>
Sun, 18 Feb 2018 19:55:33 +0000
(
03:55
+0800)
test/sandbox.js
patch
|
blob
|
history
diff --git
a/test/sandbox.js
b/test/sandbox.js
index
2c2c21a
..
d823866
100644
(file)
--- 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() {