projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8bf86d
)
[jsinterp] Prevent mis-recognitions of local functions
author
Philipp Hagemeister
<phihag@phihag.de>
Fri, 11 Jul 2014 08:44:56 +0000
(10:44 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Fri, 11 Jul 2014 08:44:56 +0000
(10:44 +0200)
youtube_dl/jsinterp.py
patch
|
blob
|
history
diff --git
a/youtube_dl/jsinterp.py
b/youtube_dl/jsinterp.py
index d7e76713f35ba18bca424046977ea5ab53a0f831..3bbb07704128cf1ab27197ca1abbeeaec086b36f 100644
(file)
--- a/
youtube_dl/jsinterp.py
+++ b/
youtube_dl/jsinterp.py
@@
-99,7
+99,7
@@
class JSInterpreter(object):
def extract_function(self, funcname):
func_m = re.search(
- (r'(?:function %s|%s\s*=\s*function)' % (
+ (r'(?:function %s|
[{;]
%s\s*=\s*function)' % (
re.escape(funcname), re.escape(funcname))) +
r'\((?P<args>[a-z,]+)\){(?P<code>[^}]+)}',
self.code)