Fix invalid escape sequences in the peg_highlight Sphinx extension (GH-22047)

This commit is contained in:
Pablo Galindo 2020-09-02 15:29:38 +01:00 committed by GitHub
parent f9c5e3f5f6
commit 5a4a963a6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View 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),