Fix #2591 (Fix invalid escape sequence error)

This commit is contained in:
Kovid Goyal 2024-12-31 23:19:25 +05:30
parent b388a91180
commit 45727ceaa7
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -32,7 +32,7 @@ from polyglot.builtins import unicode_type
class Templite: class Templite:
auto_emit = re.compile(r'''(^['"])|(^[a-zA-Z0-9_\[\]'"]+$)''') auto_emit = re.compile(r'''(^['"])|(^[a-zA-Z0-9_[\]'"]+$)''')
def __init__(self, template, start='${', end='}$'): def __init__(self, template, start='${', end='}$'):
if len(start) != 2 or len(end) != 2: if len(start) != 2 or len(end) != 2: