mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -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(',')
|
vals = accessor(sr).split(',')
|
||||||
elif locvalue in ('author2', 'title2'):
|
elif locvalue in ('author2', 'title2'):
|
||||||
m = self.IN_MATCH
|
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]
|
vals = [x for x in vals if x]
|
||||||
final_query = query.lower()
|
final_query = query.lower()
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user