[Python-checkins] bpo-46231: Remove invalid_* rules preceded by more tokens from the grammar docs (GH-30341) (GH-30392)

pablogsal webhook-mailer at python.org
Wed Jan 19 09:46:00 EST 2022


https://github.com/python/cpython/commit/353674f289076eecf848d7a26871cce529b89a98
commit: 353674f289076eecf848d7a26871cce529b89a98
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: pablogsal <Pablogsal at gmail.com>
date: 2022-01-19T14:45:50Z
summary:

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 <Pablogsal at gmail.com>

Co-authored-by: Pablo Galindo Salgado <Pablogsal at gmail.com>

files:
M Doc/tools/extensions/peg_highlight.py

diff --git a/Doc/tools/extensions/peg_highlight.py b/Doc/tools/extensions/peg_highlight.py
index 8bc24670fbe0a..4262687d95b9d 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": [



More information about the Python-checkins mailing list