-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix: '@text:prefix*' matching for fields. #4868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
dq \" | ||
sq \' | ||
esc_chars ['"\?\\abfnrtv] | ||
esc_seq \\{esc_chars} | ||
term_char [_]|\w |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did you remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because \w has [ _ ] as part of its rule.
It duplicates it. It's useless, at least.
%} | ||
|
||
blank [ \t\r] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This rule is useless.
There is no place where it is used.
@@ -191,6 +191,36 @@ TEST_F(SearchParserTest, Scanner) { | |||
NEXT_EQ(TOK_DOUBLE, string, "33.3"); | |||
} | |||
|
|||
TEST_F(SearchParserTest, EscapedTagPrefixes) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need also add tests for that to the search_family_test
You can just copy snippet from the user's issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
src/core/search/lexer.lex
Outdated
@@ -77,6 +77,7 @@ tag_val_char {term_char}|\\[,.<>{}\[\]\\\"\':;!@#$%^&*()\-+=~\/ ] | |||
{term_char}+"*" return Parser::make_PREFIX(str(), loc()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have now two times + "*"
consider add a variable for *. And may be join this to methods (if possible)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
fix: Pattern matching error when query includes escaped special characters #4691