shared: LooqsQuery: Consider " a part of the loneword
Strictly speaking a hack, and we may probably need to add more chars here. This mainly fixes the difference between: "one two" and c:("one two") In the first case they are "lonewords", the " does not get picked up. Then, the search results are something not expected.
このコミットが含まれているのは:
コミット
0d01fa977d
@ -177,7 +177,7 @@ LooqsQuery LooqsQuery::build(QString expression, TokenType loneWordsTokenType, b
|
||||
QStringList loneWords;
|
||||
LooqsQuery result;
|
||||
QRegularExpression rx("((?<filtername>(\\.|\\w)+):(?<args>\\((?<innerargs>[^\\)]+)\\)|([\\w,])+)|(?<boolean>AND|OR)"
|
||||
"|(?<negation>!)|(?<bracket>\\(|\\))|(?<loneword>\\w+))");
|
||||
"|(?<negation>!)|(?<bracket>\\(|\\))|(?<loneword>[\"\\w]+))");
|
||||
QRegularExpressionMatchIterator i = rx.globalMatch(expression);
|
||||
auto previousWasBool = [&result] { return !result.tokens.empty() && ((result.tokens.last().type & BOOL) == BOOL); };
|
||||
auto previousWas = [&result](TokenType t) { return !result.tokens.empty() && (result.tokens.last().type == t); };
|
||||
|
読み込み中…
新しいイシューから参照
ユーザーをブロックする