diff options
| author | robot-piglet <[email protected]> | 2026-05-20 14:32:16 +0300 |
|---|---|---|
| committer | robot-piglet <[email protected]> | 2026-05-20 16:18:53 +0300 |
| commit | 4a4ff781d4a9d3a49658e7aa494b0683dcb73e3b (patch) | |
| tree | 7f1b851067a3043f388a9848013f47a89f14e756 /contrib/python/Pygments/py3/pygments/lexers/javascript.py | |
| parent | d0fa929c8414276a05083a1e5b06f690b3c8fac0 (diff) | |
Intermediate changes
commit_hash:1f540eb64a7d0f5f2171dadb7b44f303876ddc85
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/javascript.py')
| -rw-r--r-- | contrib/python/Pygments/py3/pygments/lexers/javascript.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/javascript.py b/contrib/python/Pygments/py3/pygments/lexers/javascript.py index ea7bd10ca04..d361b6e716e 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/javascript.py +++ b/contrib/python/Pygments/py3/pygments/lexers/javascript.py @@ -4,7 +4,7 @@ Lexers for JavaScript and related languages. - :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -119,6 +119,8 @@ class JavascriptLexer(RegexLexer): (r'"(\\\\|\\[^\\]|[^"\\])*"', String.Double), (r"'(\\\\|\\[^\\]|[^'\\])*'", String.Single), (r'`', String.Backtick, 'interp'), + # private identifier + (r'#[a-zA-Z_]\w*', Name), ], 'interp': [ (r'`', String.Backtick, '#pop'), @@ -168,6 +170,8 @@ class TypeScriptLexer(JavascriptLexer): # Match stuff like: Decorators (r'@' + JS_IDENT, Keyword.Declaration), inherit, + # private identifier + (r'#[a-zA-Z_]\w*', Name), ], } |
