mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 17:04:39 +02:00
Fix including non-space whitespace in search term tokens
This commit is contained in:
parent
8e797e0120
commit
6b73a151a1
1 changed files with 2 additions and 2 deletions
|
|
@ -133,9 +133,9 @@ def __init__(self):
|
|||
# Had to translate named constants to numeric values
|
||||
lex_scanner = re.Scanner([
|
||||
(r'[()]', lambda x,t: (1, t)),
|
||||
(r'[^ "()]+', lambda x,t: (2, unicode(t))),
|
||||
(r'[^"()\s]+', lambda x,t: (2, unicode(t))),
|
||||
(r'".*?((?<!\\)")', lambda x,t: (3, t[1:-1])),
|
||||
(r'\s', None)
|
||||
(r'\s+', None)
|
||||
], flags=re.DOTALL)
|
||||
|
||||
def token(self, advance=False):
|
||||
|
|
|
|||
Loading…
Reference in a new issue