Skip to content

Commit

Permalink
Relax JS function regex (Closes #9863)
Browse files Browse the repository at this point in the history
Signed-off-by: Taapat <taapat@gmail.com>
  • Loading branch information
dstftw authored and Taapat committed Jun 25, 2016
1 parent 639dfc3 commit 375ab32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jsinterp.py
Expand Up @@ -234,7 +234,7 @@ def extract_object(self, objname):
def extract_function(self, funcname):
func_m = re.search(
r'''(?x)
(?:function\s+%s|[{;,]%s\s*=\s*function|var\s+%s\s*=\s*function)\s*
(?:function\s+%s|[{;,]\s*%s\s*=\s*function|var\s+%s\s*=\s*function)\s*
\((?P<args>[^)]*)\)\s*
\{(?P<code>[^}]+)\}''' % (
re.escape(funcname), re.escape(funcname), re.escape(funcname)),
Expand Down

0 comments on commit 375ab32

Please sign in to comment.