mirror of
https://github.com/zadam/trilium.git
synced 2024-09-20 23:55:59 +08:00
fuzzy search for values as well
This commit is contained in:
parent
2e6395ad88
commit
a06662f4ce
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue