- don't hang if group id is followed by whitespace (closes bug #114660)

This commit is contained in:
Fredrik Lundh 2000-09-24 14:46:23 +00:00
parent 96753b3482
commit 19f977ba40
3 changed files with 4 additions and 2 deletions

View file

@ -634,7 +634,7 @@ def parse_template(source, pattern):
while 1:
group = _group(this, pattern.groups+1)
if group:
if (not s.next or
if (s.next not in DIGITS or
not _group(this + s.next, pattern.groups+1)):
code = MARK, int(group)
break