mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix searching for prefixes where the prefix exists on a non-matching item
This commit is contained in:
parent
7b7ac2f91e
commit
df46544ee8
@ -128,7 +128,8 @@ def _match(query, value, matchkind):
|
|||||||
if query[0] == '.':
|
if query[0] == '.':
|
||||||
if t.startswith(query[1:]):
|
if t.startswith(query[1:]):
|
||||||
ql = len(query) - 1
|
ql = len(query) - 1
|
||||||
return (len(t) == ql) or (t[ql:ql+1] == '.')
|
if (len(t) == ql) or (t[ql:ql+1] == '.'):
|
||||||
|
return True
|
||||||
elif query == t:
|
elif query == t:
|
||||||
return True
|
return True
|
||||||
elif ((matchkind == REGEXP_MATCH and re.search(query, t, re.I)) or ### search unanchored
|
elif ((matchkind == REGEXP_MATCH and re.search(query, t, re.I)) or ### search unanchored
|
||||||
|
Loading…
x
Reference in New Issue
Block a user