]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix invalid escape sequences in the peg_highlight Sphinx extension (GH-22047)
authorPablo Galindo <Pablogsal@gmail.com>
Wed, 2 Sep 2020 14:29:38 +0000 (15:29 +0100)
committerGitHub <noreply@github.com>
Wed, 2 Sep 2020 14:29:38 +0000 (15:29 +0100)
Doc/tools/extensions/peg_highlight.py

index f02515d3919cf24b9536bc870a5673ee752e83ce..8bc24670fbe0abe5020c6055f7bea80bb8ab25de 100644 (file)
@@ -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),