mirror of
https://github.com/ankitects/anki.git
synced 2025-11-09 14:17:13 -05:00
fix from marcus for "field":value search
This commit is contained in:
parent
0194296839
commit
1a5c8d2435
1 changed files with 2 additions and 2 deletions
|
|
@ -2321,10 +2321,10 @@ where id = :id""", pending)
|
||||||
if token['value'].startswith(":") and len(phraselog) == 1:
|
if token['value'].startswith(":") and len(phraselog) == 1:
|
||||||
#we now know a colon is next, so mark it as field
|
#we now know a colon is next, so mark it as field
|
||||||
# and keep looking for the value
|
# and keep looking for the value
|
||||||
field = phraselog[0][0]
|
field = phraselog[0]['value']
|
||||||
parts = token['value'].split(':', 1)
|
parts = token['value'].split(':', 1)
|
||||||
phraselog.append(
|
phraselog.append(
|
||||||
{'value': token, 'is_neg': False,
|
{'value': token['value'], 'is_neg': False,
|
||||||
'type': SEARCH_PHRASE, 'filter': token['filter']})
|
'type': SEARCH_PHRASE, 'filter': token['filter']})
|
||||||
if parts[1]:
|
if parts[1]:
|
||||||
#value is included with the :, so wrap it up
|
#value is included with the :, so wrap it up
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue