The ! operator can now only precede a search term when using boolean expressions. This allows searches such as 'kaboom! | arms' to evaluate correctly.

This commit is contained in:
Krazy
2014-10-03 21:55:35 +00:00
parent 20990440bb
commit aa3480be4d

View File

@@ -58,7 +58,7 @@ public class BooleanExpression {
operator = Operator.OPEN_PAREN;
} else if (token.equals(Operator.CLOSE_PAREN.token)) {
operator = Operator.CLOSE_PAREN;
} else if (token.equals(Operator.NOT.token)) {
} else if (token.equals(Operator.NOT.token) && currentValue.trim().isEmpty()) { //Ignore ! operators that aren't the first token in a search term (Don't use '!' in 'Kaboom!')
operator = Operator.NOT;
} else if (token.equals(Operator.ESCAPE.token)) {
escapeNext = true;