diff options
author | Fabrizio Riguzzi <fabrizio.riguzzi@unife.it> | 2022-02-20 13:20:18 +0100 |
---|---|---|
committer | Fabrizio Riguzzi <fabrizio.riguzzi@unife.it> | 2022-02-20 13:20:18 +0100 |
commit | 61c78d1effec9b4e80c434320d772eee37a002a0 (patch) | |
tree | 1aa99967ee66eb31e033d63d4b77278e74da2a25 /pygments/lexers/python.py | |
parent | c9bd789dbb397792f5adf912f8599175066724e9 (diff) | |
parent | 4b8738a825bef845e66ce57d4ca204b584afda08 (diff) | |
download | pygments-git-61c78d1effec9b4e80c434320d772eee37a002a0.tar.gz |
Merge branch 'master' of github.com:pygments/pygments
Diffstat (limited to 'pygments/lexers/python.py')
-rw-r--r-- | pygments/lexers/python.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pygments/lexers/python.py b/pygments/lexers/python.py index a83bc92a..3b647fc8 100644 --- a/pygments/lexers/python.py +++ b/pygments/lexers/python.py @@ -61,8 +61,6 @@ class PythonLexer(RegexLexer): mimetypes = ['text/x-python', 'application/x-python', 'text/x-python3', 'application/x-python3'] - flags = re.MULTILINE | re.UNICODE - uni_name = "[%s][%s]*" % (uni.xid_start, uni.xid_continue) def innerstring_rules(ttype): @@ -214,7 +212,7 @@ class PythonLexer(RegexLexer): (r'(^[ \t]*)' # at beginning of line + possible indentation r'(match|case)\b' # a possible keyword r'(?![ \t]*(?:' # not followed by... - r'[:,;=^&|@~)\]}]|(?:' + # characters and keywords that mean this isn't + r'[:,;=^&|@~)\]}]|(?:' + # characters and keywords that mean this isn't r'|'.join(keyword.kwlist) + r')\b))', # pattern matching bygroups(Text, Keyword), 'soft-keywords-inner'), ], |