[Python-checkins] Fix invalid escape sequences in the peg_highlight Sphinx extension (GH-22047)
Pablo Galindo
webhook-mailer at python.org
Wed Sep 2 10:29:46 EDT 2020
https://github.com/python/cpython/commit/5a4a963a6c798fa9207a9998618a9c0ec3b6b6d7
commit: 5a4a963a6c798fa9207a9998618a9c0ec3b6b6d7
branch: master
author: Pablo Galindo <Pablogsal at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-09-02T15:29:38+01:00
summary:
Fix invalid escape sequences in the peg_highlight Sphinx extension (GH-22047)
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 f02515d3919cf..8bc24670fbe0a 100644
--- a/Doc/tools/extensions/peg_highlight.py
+++ b/Doc/tools/extensions/peg_highlight.py
@@ -59,7 +59,7 @@ class PEGLexer(RegexLexer):
include("variables"),
(r"\b(?!(NULL|EXTRA))([A-Z_]+)\b\s*(?!\()", Text,),
(
- r"^\s*" + _name + "\s*" + "(\[.*\])?" + "\s*" + "(\(.+\))?" + "\s*(:)",
+ r"^\s*" + _name + r"\s*" + r"(\[.*\])?" + r"\s*" + r"(\(.+\))?" + r"\s*(:)",
bygroups(Name.Function, None, None, Punctuation),
),
(_name, Name.Function),
More information about the Python-checkins
mailing list