mirror of
https://github.com/python/cpython.git
synced 2025-07-12 13:55:34 +00:00
SRE didn't handle character category followed by hyphen inside a
character class. Fix provided by Andrew Kuchling. Closes bug #116251.
This commit is contained in:
parent
53f3d4ac74
commit
025468d246
2 changed files with 4 additions and 0 deletions
|
@ -393,6 +393,8 @@ def _parse(source, state):
|
|||
# potential range
|
||||
this = source.get()
|
||||
if this == "]":
|
||||
if code1[0] is IN:
|
||||
code1 = code1[1][0]
|
||||
set.append(code1)
|
||||
set.append((LITERAL, ord("-")))
|
||||
break
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue