mirror of
https://github.com/zadam/trilium.git
synced 2025-11-15 09:45:52 +01:00
added note.text + tests
This commit is contained in:
@@ -127,6 +127,17 @@ function getExpression(tokens, parsingContext, level = 0) {
|
||||
return parseRelation(tokens[i].token);
|
||||
}
|
||||
|
||||
if (tokens[i].token === 'text') {
|
||||
if (tokens[i + 1].token !== '*=*') {
|
||||
parsingContext.addError(`Virtual attribute "note.text" supports only *=* operator, instead given "${tokens[i + 1].token}" in ${context(i)}`);
|
||||
return;
|
||||
}
|
||||
|
||||
i += 2;
|
||||
|
||||
return getFulltext([tokens[i]], parsingContext);
|
||||
}
|
||||
|
||||
if (PropertyComparisonExp.isProperty(tokens[i].token)) {
|
||||
const propertyName = tokens[i].token;
|
||||
const operator = tokens[i + 1].token;
|
||||
|
||||
@@ -10,7 +10,7 @@ const PROP_MAPPING = {
|
||||
"type": "type",
|
||||
"mime": "mime",
|
||||
"isprotected": "isProtected",
|
||||
"isarhived": "isArchived",
|
||||
"isarchived": "isArchived",
|
||||
"datecreated": "dateCreated",
|
||||
"datemodified": "dateModified",
|
||||
"utcdatecreated": "utcDateCreated",
|
||||
|
||||
Reference in New Issue
Block a user