mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 22:35:50 +01:00
fuzzy search for values as well
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -4,6 +4,7 @@ class ParsingContext {
|
||||
constructor(includeNoteContent) {
|
||||
this.includeNoteContent = includeNoteContent;
|
||||
this.highlightedTokens = [];
|
||||
this.fuzzyAttributeSearch = false;
|
||||
this.error = null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user