mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Store: Change punucation into spaces when using author or title searching.
This commit is contained in:
parent
8b372eeb44
commit
a043e21c8e
@ -451,7 +451,9 @@ class SearchFilter(SearchQueryParser):
|
||||
vals = accessor(sr).split(',')
|
||||
elif locvalue in ('author2', 'title2'):
|
||||
m = self.IN_MATCH
|
||||
vals = re.sub(r'(^|\s)(and|not|or|a|the|is|of|,)(\s|$)', ' ', accessor(sr)).split(' ')
|
||||
vals = re.sub(r'(^|\s)(and|not|or|a|the|is|of)(\s|$)', ' ', accessor(sr))
|
||||
vals = re.sub('[.,!@#$%^&*\(\)\'"\[\]]', ' ', vals)
|
||||
vals = vals.split(' ')
|
||||
vals = [x for x in vals if x]
|
||||
final_query = query.lower()
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user