fuzzy search for values as well

This commit is contained in:
zadam 2020-05-21 13:45:18 +02:00
parent 2e6395ad88
commit a06662f4ce
2 changed files with 6 additions and 1 deletions

View file

@ -54,11 +54,15 @@ function getExpression(tokens, parsingContext) {
parsingContext.highlightedTokens.push(token.substr(1));
if (i < tokens.length - 2 && isOperator(tokens[i + 1])) {
const operator = tokens[i + 1];
let operator = tokens[i + 1];
const comparedValue = tokens[i + 2];
parsingContext.highlightedTokens.push(comparedValue);
if (parsingContext.fuzzyAttributeSearch && operator === '=') {
operator = '*=*';
}
const comparator = comparatorBuilder(operator, comparedValue);
if (!comparator) {

View file

@ -4,6 +4,7 @@ class ParsingContext {
constructor(includeNoteContent) {
this.includeNoteContent = includeNoteContent;
this.highlightedTokens = [];
this.fuzzyAttributeSearch = false;
this.error = null;
}