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: 6 additions & 2 deletions marimo/_utils/fuzzy_match.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def is_fuzzy_match(
is_regex: Whether the query is a valid regex.
"""
if is_regex and compiled_pattern:
return bool(compiled_pattern.search(name))
return compiled_pattern.search(name) is not None
else:
return query.lower() in name.lower()
if query in name:
return True
lowered_query = query.lower()
lowered_name = name.lower()
return lowered_query in lowered_name