From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 19 Jan 2022 14:45:50 +0000 (-0800) Subject: bpo-46231: Remove invalid_* rules preceded by more tokens from the grammar docs ... X-Git-Tag: v3.9.11~156 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=353674f289076eecf848d7a26871cce529b89a98;p=thirdparty%2FPython%2Fcpython.git bpo-46231: Remove invalid_* rules preceded by more tokens from the grammar docs (GH-30341) (GH-30392) (cherry picked from commit e09d94a140a5f6903017da9b6ac752ba041d69da) Co-authored-by: Pablo Galindo Salgado Co-authored-by: Pablo Galindo Salgado --- diff --git a/Doc/tools/extensions/peg_highlight.py b/Doc/tools/extensions/peg_highlight.py index 8bc24670fbe0..4262687d95b9 100644 --- a/Doc/tools/extensions/peg_highlight.py +++ b/Doc/tools/extensions/peg_highlight.py @@ -45,8 +45,8 @@ class PEGLexer(RegexLexer): ], "variables": [(_name + _text_ws + "(=)", bygroups(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": [