mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +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:
|
#query:
|
||||||
::space::? primary()? ::space::?
|
::space::? primary()? ::space::?
|
||||||
|
| catch_all()
|
||||||
|
|
||||||
|
catch_all:
|
||||||
|
( <space>
|
||||||
|
| <word>
|
||||||
|
| keyword()
|
||||||
|
| symbol() #text )*
|
||||||
|
|
||||||
// Boolean operators
|
// Boolean operators
|
||||||
|
|
||||||
@@ -101,13 +107,9 @@ term:
|
|||||||
// Free text handling
|
// Free text handling
|
||||||
|
|
||||||
text:
|
text:
|
||||||
string_keyword_symbol()
|
|
||||||
( <space>? string_keyword_symbol() )*
|
|
||||||
( ::space::? context_block() )?
|
|
||||||
|
|
||||||
string_keyword_symbol:
|
|
||||||
string()
|
string()
|
||||||
| symbol()
|
( <space>? string() )*
|
||||||
|
( ::space::? context_block() )?
|
||||||
|
|
||||||
context_block:
|
context_block:
|
||||||
::parenthese_:: ::space::? context() ::space::? ::_parenthese:: #context
|
::parenthese_:: ::space::? context() ::space::? ::_parenthese:: #context
|
||||||
|
Reference in New Issue
Block a user