Skip to content

Commit 353674f

Browse files
bpo-46231: Remove invalid_* rules preceded by more tokens from the grammar docs (GH-30341) (GH-30392)
(cherry picked from commit e09d94a) Co-authored-by: Pablo Galindo Salgado <[email protected]> Co-authored-by: Pablo Galindo Salgado <[email protected]>
1 parent 7b694b8 commit 353674f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/tools/extensions/peg_highlight.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ class PEGLexer(RegexLexer):
4545
],
4646
"variables": [(_name + _text_ws + "(=)", bygroups(None, None, None),),],
4747
"invalids": [
48-
(r"^(\s+\|\s+invalid_\w+\s*\n)", bygroups(None)),
49-
(r"^(\s+\|\s+incorrect_\w+\s*\n)", bygroups(None)),
48+
(r"^(\s+\|\s+.*invalid_\w+.*\n)", bygroups(None)),
49+
(r"^(\s+\|\s+.*incorrect_\w+.*\n)", bygroups(None)),
5050
(r"^(#.*invalid syntax.*(?:.|\n)*)", bygroups(None),),
5151
],
5252
"root": [

0 commit comments

Comments
 (0)