From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 2 Sep 2020 16:43:43 +0000 (-0700) Subject: Fix invalid escape sequences in the peg_highlight Sphinx extension (GH-22047) (GH... X-Git-Tag: v3.9.0rc2~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=27183f48f256e19dbd6fba2b8c95a59de4e04e37;p=thirdparty%2FPython%2Fcpython.git Fix invalid escape sequences in the peg_highlight Sphinx extension (GH-22047) (GH-22065) (cherry picked from commit 5a4a963a6c798fa9207a9998618a9c0ec3b6b6d7) Co-authored-by: Pablo Galindo Co-authored-by: Pablo Galindo --- diff --git a/Doc/tools/extensions/peg_highlight.py b/Doc/tools/extensions/peg_highlight.py index f02515d3919c..8bc24670fbe0 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),