remove pipe character from allowed set for unqoted term

This commit is contained in:
Bilal Catic
2020-01-23 18:14:53 +01:00
parent 265aeacf40
commit 323e815d5f
2 changed files with 1 additions and 10 deletions

View File

@@ -129,15 +129,6 @@ class QueryLexerTester
expect(@result[2][1]).to eq '"name with space"'
end
it 'tests search term without quotes containing pipe characters' do
@result = @evaluator.tokenize('||')
expect(@result.length).to eq 1
expect(@result[0][0]).to eq :TERM_WITHOUT_QUOTES
expect(@result[0][1]).to eq '||'
end
it 'tests search term with quotes containing non alphanumerical characters' do
@result = @evaluator.tokenize('"|*|/\()#-!=<>&$"')

View File

@@ -7,7 +7,7 @@ macro
OPERATOR_AND (?i)and
OPERATOR_NOT (?i)not
TERM_WITH_QUOTES "([^"]*)"
TERM_WITHOUT_QUOTES [a-zA-Z0-9-_|]+
TERM_WITHOUT_QUOTES [a-zA-Z0-9-_]+
COLON \: