mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
shortcut negation syntax
This commit is contained in:
@@ -64,6 +64,11 @@ describe("Lexer expression", () => {
|
||||
.toEqual(["#", "~author", ".", "title", "=", "hugh howey", "and", "note", ".", "book title", "=", "silo"]);
|
||||
});
|
||||
|
||||
it("negation of label and relation", () => {
|
||||
expect(lexer(`#!capital ~!neighbor`).expressionTokens)
|
||||
.toEqual(["#!capital", "~!neighbor"]);
|
||||
});
|
||||
|
||||
it("negation of sub-expression", () => {
|
||||
expect(lexer(`# not(#capital) and note.noteId != "root"`).expressionTokens)
|
||||
.toEqual(["#", "not", "(", "#capital", ")", "and", "note", ".", "noteid", "!=", "root"]);
|
||||
|
||||
Reference in New Issue
Block a user