- fixed grouping error bug

- changed "group" operator to "groupref"
This commit is contained in:
Fredrik Lundh 2000-07-03 21:31:48 +00:00
parent 6f01398236
commit 72b82ba16d
6 changed files with 55 additions and 31 deletions

View file

@ -241,7 +241,7 @@ def _escape(source, escape, state):
if group:
if (not source.next or
not _group(escape + source.next, state.groups)):
return GROUP, group
return GROUPREF, group
escape = escape + source.get()
elif source.next in OCTDIGITS:
escape = escape + source.get()
@ -450,7 +450,7 @@ def _parse(source, state):
gid = state.groupdict.get(name)
if gid is None:
raise error, "unknown group name"
subpattern.append((GROUP, gid))
subpattern.append((GROUPREF, gid))
elif source.match("#"):
index = ""
while 1: