]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-46231: Remove invalid_* rules preceded by more tokens from the grammar docs ...
authorPablo Galindo Salgado <Pablogsal@gmail.com>
Tue, 4 Jan 2022 10:42:15 +0000 (10:42 +0000)
committerGitHub <noreply@github.com>
Tue, 4 Jan 2022 10:42:15 +0000 (10:42 +0000)
Doc/tools/extensions/peg_highlight.py

index 42101be10ea9b6c80580b6eeac1aa497f7349432..27f54cdf593c875d903e75eef3f44be48102a641 100644 (file)
@@ -56,8 +56,8 @@ class PEGLexer(RegexLexer):
             (_name + _text_ws + r"(\[[\w\d_\*]+?\])" + _text_ws + "(=)", bygroups(None, None, None, None, None),),
         ],
         "invalids": [
-            (r"^(\s+\|\s+invalid_\w+\s*\n)", bygroups(None)),
-            (r"^(\s+\|\s+incorrect_\w+\s*\n)", bygroups(None)),
+            (r"^(\s+\|\s+.*invalid_\w+.*\n)", bygroups(None)),
+            (r"^(\s+\|\s+.*incorrect_\w+.*\n)", bygroups(None)),
             (r"^(#.*invalid syntax.*(?:.|\n)*)", bygroups(None),),
         ],
         "root": [