ignore whitespace in search
This commit is contained in:
parent
90457a8237
commit
04e1785e27
1 changed files with 2 additions and 1 deletions
|
@ -88,7 +88,8 @@ async def find_things(
|
|||
Returns:
|
||||
list of things that somehow include the search string
|
||||
"""
|
||||
fuzzy = re.compile(".*" + ".*".join(search_string) + ".*", flags=re.IGNORECASE)
|
||||
fuzzy = re.compile(".*" + ".*".join(map(str.strip, search_string)) + ".*",
|
||||
flags=re.IGNORECASE)
|
||||
score_categories = ("startswith", "startswithLower", "inLower", "fuzzy")
|
||||
|
||||
def match_score_one_string(string: Optional[str]) -> dict[str, float]:
|
||||
|
|
Loading…
Reference in a new issue