From eb05d9c7687dc0ca0f5a23009493eaead2dafca9 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Wed, 2 Sep 2020 15:29:38 +0100 Subject: [PATCH] Fix invalid escape sequences in the peg_highlight Sphinx extension (GH-22047) (cherry picked from commit 5a4a963a6c798fa9207a9998618a9c0ec3b6b6d7) Co-authored-by: Pablo Galindo --- Doc/tools/extensions/peg_highlight.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/tools/extensions/peg_highlight.py b/Doc/tools/extensions/peg_highlight.py index f02515d3919cf2..8bc24670fbe0ab 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),