diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-05-27 17:20:12 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-05-27 17:20:12 -0700 |
commit | e792dc4e6aea8bd4b95eada40f85e8c0598dfc3d (patch) | |
tree | 565fada0d7733fddeecdc0baa67cba3850f09374 /src | |
parent | afd5a42acfb5885bcb48aae1a5114396f5e54481 (diff) |
fix ccall regex for minified code, and add testing
Diffstat (limited to 'src')
-rw-r--r-- | src/preamble.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/preamble.js b/src/preamble.js index fbce6b6b..58b442ab 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -396,7 +396,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); |