Skip to content

Commit

Permalink
Fix compilation of certain regexps
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Gaynor committed Apr 10, 2013
1 parent 249d49c commit f3b91c5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/objects/test_regexpobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def test_compile_regexps(self, space):
/(?:a|b)*/
/.*/m
/(.*|.+)/
/(?<=b)/
""")

def test_regexp_syntax_errors(self, space):
Expand Down
3 changes: 3 additions & 0 deletions topaz/utils/regexp.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ def __init__(self, value, case_insensitive=False, positive=True, zerowidth=False
def rebuild(self, positive, case_insensitive, zerowidth):
return Character(self.value, positive=positive, case_insensitive=case_insensitive, zerowidth=zerowidth)

def getwidth(self):
return 1, 1

def fix_groups(self):
pass

Expand Down

0 comments on commit f3b91c5

Please sign in to comment.