mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Move catch all logic out of « text » rule
Prevent character greediness when symbols like colon appear after the start of a string. Needed for implicit AND with key value pairs.
This commit is contained in:
@@ -41,7 +41,13 @@
|
||||
|
||||
#query:
|
||||
::space::? primary()? ::space::?
|
||||
| catch_all()
|
||||
|
||||
catch_all:
|
||||
( <space>
|
||||
| <word>
|
||||
| keyword()
|
||||
| symbol() #text )*
|
||||
|
||||
// Boolean operators
|
||||
|
||||
@@ -101,13 +107,9 @@ term:
|
||||
// Free text handling
|
||||
|
||||
text:
|
||||
string_keyword_symbol()
|
||||
( <space>? string_keyword_symbol() )*
|
||||
( ::space::? context_block() )?
|
||||
|
||||
string_keyword_symbol:
|
||||
string()
|
||||
| symbol()
|
||||
( <space>? string() )*
|
||||
( ::space::? context_block() )?
|
||||
|
||||
context_block:
|
||||
::parenthese_:: ::space::? context() ::space::? ::_parenthese:: #context
|
||||
|
Reference in New Issue
Block a user