mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix regression in search
This commit is contained in:
commit
3f226d4436
@ -156,12 +156,14 @@ def _match(query, value, matchkind):
|
|||||||
elif query == t:
|
elif query == t:
|
||||||
return True
|
return True
|
||||||
elif matchkind == REGEXP_MATCH:
|
elif matchkind == REGEXP_MATCH:
|
||||||
return re.search(query, t, re.I|re.UNICODE)
|
if re.search(query, t, re.I|re.UNICODE):
|
||||||
|
return True
|
||||||
elif matchkind == CONTAINS_MATCH:
|
elif matchkind == CONTAINS_MATCH:
|
||||||
if pref_use_primary_find_in_search:
|
if pref_use_primary_find_in_search:
|
||||||
return primary_find(query, t)[0] != -1
|
if primary_find(query, t)[0] != -1:
|
||||||
else:
|
return True
|
||||||
return query in t
|
elif query in t:
|
||||||
|
return True
|
||||||
except re.error:
|
except re.error:
|
||||||
pass
|
pass
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user