diff options
Diffstat (limited to 'pygments/lexers/javascript.py')
-rw-r--r-- | pygments/lexers/javascript.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/javascript.py b/pygments/lexers/javascript.py index 42200e94..329120e5 100644 --- a/pygments/lexers/javascript.py +++ b/pygments/lexers/javascript.py @@ -509,7 +509,7 @@ class TypeScriptLexer(RegexLexer): (r'(super)(\s*)(\([\w,?.$\s]+\s*\))', bygroups(Keyword.Reserved, Text), 'slashstartsregex'), # Match stuff like: function() {...} - (r'([a-zA-Z_?.$][\w?.$]*)\(\) \{', Name.Other, 'slashstartsregex'), + (r'([a-zA-Z_?.$][\w?.$]*)(?=\(\) \{)', Name.Other, 'slashstartsregex'), # Match stuff like: (function: return type) (r'([\w?.$][\w?.$]*)(\s*:\s*)([\w?.$][\w?.$]*)', bygroups(Name.Other, Text, Keyword.Type)), |