mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Temporary fix for multiple search terms being treated as one.
This commit is contained in:
@@ -35,11 +35,15 @@ public class SFilterUtil {
|
||||
return Predicates.alwaysTrue();
|
||||
}
|
||||
|
||||
BooleanExpression expression = new BooleanExpression(text, inName, inType, inText, inCost);
|
||||
if (BooleanExpression.isExpression(text)) {
|
||||
|
||||
BooleanExpression expression = new BooleanExpression(text, inName, inType, inText, inCost);
|
||||
|
||||
Predicate<CardRules> filter = expression.evaluate();
|
||||
if (filter != null) {
|
||||
return Predicates.compose(invert ? Predicates.not(filter) : filter, PaperCard.FN_GET_RULES);
|
||||
}
|
||||
|
||||
Predicate<CardRules> filter = expression.evaluate();
|
||||
if (filter != null) {
|
||||
return Predicates.compose(invert ? Predicates.not(filter) : filter, PaperCard.FN_GET_RULES);
|
||||
}
|
||||
|
||||
String[] splitText = text.replaceAll(",", "").replaceAll(" ", " ").split(" ");
|
||||
@@ -123,6 +127,10 @@ public class SFilterUtil {
|
||||
parse();
|
||||
}
|
||||
|
||||
private static boolean isExpression(String text) {
|
||||
return text.contains(Operation.AND.token) || text.contains(Operation.OR.token);
|
||||
}
|
||||
|
||||
private void parse() {
|
||||
Tokenizer tokenizer = new Tokenizer(text);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user