mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
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:
@@ -58,7 +58,7 @@ public class BooleanExpression {
|
|||||||
operator = Operator.OPEN_PAREN;
|
operator = Operator.OPEN_PAREN;
|
||||||
} else if (token.equals(Operator.CLOSE_PAREN.token)) {
|
} else if (token.equals(Operator.CLOSE_PAREN.token)) {
|
||||||
operator = Operator.CLOSE_PAREN;
|
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;
|
operator = Operator.NOT;
|
||||||
} else if (token.equals(Operator.ESCAPE.token)) {
|
} else if (token.equals(Operator.ESCAPE.token)) {
|
||||||
escapeNext = true;
|
escapeNext = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user