From: Pablo Galindo Salgado Date: Tue, 4 Jan 2022 10:42:15 +0000 (+0000) Subject: bpo-46231: Remove invalid_* rules preceded by more tokens from the grammar docs ... X-Git-Tag: v3.11.0a4~88 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e09d94a140a5f6903017da9b6ac752ba041d69da;p=thirdparty%2FPython%2Fcpython.git bpo-46231: Remove invalid_* rules preceded by more tokens from the grammar docs (GH-30341) --- diff --git a/Doc/tools/extensions/peg_highlight.py b/Doc/tools/extensions/peg_highlight.py index 42101be10ea9..27f54cdf593c 100644 --- a/Doc/tools/extensions/peg_highlight.py +++ b/Doc/tools/extensions/peg_highlight.py @@ -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": [