mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-29 13:45:11 +01:00
Fix searching for prefixes where the prefix exists on a non-matching item
This commit is contained in:
parent
7b7ac2f91e
commit
df46544ee8
1 changed files with 2 additions and 1 deletions
|
|
@ -128,7 +128,8 @@ def _match(query, value, matchkind):
|
|||
if query[0] == '.':
|
||||
if t.startswith(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:
|
||||
return True
|
||||
elif ((matchkind == REGEXP_MATCH and re.search(query, t, re.I)) or ### search unanchored
|
||||
|
|
|
|||
Loading…
Reference in a new issue