aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-04 13:05:43 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-04 13:05:43 -0700
commit3431eab292e0b9e2359b183fa2c954eb7e5cf7e7 (patch)
tree43e0702b4254baea97f3e503d77e108b12a187ab
parent332d525ce074a2bcdf0567a934f58788cd90d51c (diff)
fix sourceRegex for IE; issue #2400
-rw-r--r--src/preamble.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/preamble.js b/src/preamble.js
index 431a3c27..ae58e7e0 100644
--- a/src/preamble.js
+++ b/src/preamble.js
@@ -401,7 +401,7 @@ var cwrap, ccall;
return ret;
}
- var sourceRegex = /^function\s\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;
+ var sourceRegex = /^function\s*\(([^)]*)\)\s*{\s*([^*]*?)[\s;]*(?:return\s*(.*?)[;\s]*)?}$/;
function parseJSFunc(jsfunc) {
// Match the body and the return value of a javascript function source
var parsed = jsfunc.toString().match(sourceRegex).slice(1);