Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/license_expression/_pyahocorasick.py
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,11 @@ def overlap(self, other):
# tokenize to separate text from parens
_tokenizer = re.compile(
r"""
(?P<text>[^\s\(\)]+)
(?:[^\s\(\)]+) # text
|
(?P<space>\s+)
(?:\s+) # space
|
(?P<parens>[\(\)])
(?:[\(\)]) # parens
""",
re.VERBOSE | re.MULTILINE | re.UNICODE,
)
Expand All @@ -646,4 +646,4 @@ def get_tokens(tokens_string):
"""
Return an iterable of strings splitting on spaces and parens.
"""
return [match for match in _tokenizer.split(tokens_string.lower()) if match]
return _tokenizer.findall(tokens_string.lower())