diff options
author | robot-piglet <robot-piglet@yandex-team.com> | 2024-05-20 07:58:40 +0300 |
---|---|---|
committer | robot-piglet <robot-piglet@yandex-team.com> | 2024-05-20 08:05:00 +0300 |
commit | bcd5bcc390793791d293d386b2ebefbe683fb4e1 (patch) | |
tree | c93e3b8c847237e7e7626f4a07f1b657bb34f04d /contrib/python/Pygments/py3/pygments/lexers/jsonnet.py | |
parent | 1a9f1508fe9c8c5927ffebf33197a6108e70501d (diff) | |
download | ydb-bcd5bcc390793791d293d386b2ebefbe683fb4e1.tar.gz |
Intermediate changes
Diffstat (limited to 'contrib/python/Pygments/py3/pygments/lexers/jsonnet.py')
-rw-r--r-- | contrib/python/Pygments/py3/pygments/lexers/jsonnet.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/python/Pygments/py3/pygments/lexers/jsonnet.py b/contrib/python/Pygments/py3/pygments/lexers/jsonnet.py index 3905f88718..aeaf53dc86 100644 --- a/contrib/python/Pygments/py3/pygments/lexers/jsonnet.py +++ b/contrib/python/Pygments/py3/pygments/lexers/jsonnet.py @@ -4,7 +4,7 @@ Lexer for Jsonnet data templating language. - :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. + :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ @@ -20,7 +20,7 @@ jsonnet_function_token = jsonnet_token + r'(?=\()' def string_rules(quote_mark): return [ - (r"[^{}\\]".format(quote_mark), String), + (rf"[^{quote_mark}\\]", String), (r"\\.", String.Escape), (quote_mark, String, '#pop'), ] @@ -28,7 +28,7 @@ def string_rules(quote_mark): def quoted_field_name(quote_mark): return [ - (r'([^{quote}\\]|\\.)*{quote}'.format(quote=quote_mark), + (rf'([^{quote_mark}\\]|\\.)*{quote_mark}', Name.Variable, 'field_separator') ] @@ -40,6 +40,7 @@ class JsonnetLexer(RegexLexer): aliases = ['jsonnet'] filenames = ['*.jsonnet', '*.libsonnet'] url = "https://jsonnet.org" + version_added = '' tokens = { # Not used by itself '_comments': [ |