mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-12-18 00:24:04 -05:00
[jsinterp] Prevent mis-recognitions of local functions
This commit is contained in:
parent
c8bf86d50d
commit
fc040bfd05
1 changed files with 1 additions and 1 deletions
|
@ -99,7 +99,7 @@ def interpret_expression(self, expr, local_vars, allow_recursion):
|
||||||
|
|
||||||
def extract_function(self, funcname):
|
def extract_function(self, funcname):
|
||||||
func_m = re.search(
|
func_m = re.search(
|
||||||
(r'(?:function %s|%s\s*=\s*function)' % (
|
(r'(?:function %s|[{;]%s\s*=\s*function)' % (
|
||||||
re.escape(funcname), re.escape(funcname))) +
|
re.escape(funcname), re.escape(funcname))) +
|
||||||
r'\((?P<args>[a-z,]+)\){(?P<code>[^}]+)}',
|
r'\((?P<args>[a-z,]+)\){(?P<code>[^}]+)}',
|
||||||
self.code)
|
self.code)
|
||||||
|
|
Loading…
Reference in a new issue