mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02: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));
|
parsingContext.highlightedTokens.push(token.substr(1));
|
||||||
|
|
||||||
if (i < tokens.length - 2 && isOperator(tokens[i + 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];
|
const comparedValue = tokens[i + 2];
|
||||||
|
|
||||||
parsingContext.highlightedTokens.push(comparedValue);
|
parsingContext.highlightedTokens.push(comparedValue);
|
||||||
|
|
||||||
|
if (parsingContext.fuzzyAttributeSearch && operator === '=') {
|
||||||
|
operator = '*=*';
|
||||||
|
}
|
||||||
|
|
||||||
const comparator = comparatorBuilder(operator, comparedValue);
|
const comparator = comparatorBuilder(operator, comparedValue);
|
||||||
|
|
||||||
if (!comparator) {
|
if (!comparator) {
|
||||||
|
@ -4,6 +4,7 @@ class ParsingContext {
|
|||||||
constructor(includeNoteContent) {
|
constructor(includeNoteContent) {
|
||||||
this.includeNoteContent = includeNoteContent;
|
this.includeNoteContent = includeNoteContent;
|
||||||
this.highlightedTokens = [];
|
this.highlightedTokens = [];
|
||||||
|
this.fuzzyAttributeSearch = false;
|
||||||
this.error = null;
|
this.error = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user