mirror of
https://github.com/zadam/trilium.git
synced 2025-11-16 10:15:52 +01:00
chore(prettier): fix all files
This commit is contained in:
@@ -7,7 +7,6 @@ import becca from "../../../becca/becca.js";
|
||||
import Expression from "./expression.js";
|
||||
|
||||
class AttributeExistsExp extends Expression {
|
||||
|
||||
private attributeType: string;
|
||||
private attributeName: string;
|
||||
private isTemplateLabel: boolean;
|
||||
@@ -19,14 +18,12 @@ class AttributeExistsExp extends Expression {
|
||||
this.attributeType = attributeType;
|
||||
this.attributeName = attributeName;
|
||||
// template attr is used as a marker for templates, but it's not meant to be inherited
|
||||
this.isTemplateLabel = this.attributeType === 'label' && (this.attributeName === 'template' || this.attributeName === 'workspacetemplate');
|
||||
this.isTemplateLabel = this.attributeType === "label" && (this.attributeName === "template" || this.attributeName === "workspacetemplate");
|
||||
this.prefixMatch = prefixMatch;
|
||||
}
|
||||
|
||||
execute(inputNoteSet: NoteSet, executionContext: {}, searchContext: SearchContext) {
|
||||
const attrs = this.prefixMatch
|
||||
? becca.findAttributesWithPrefix(this.attributeType, this.attributeName)
|
||||
: becca.findAttributes(this.attributeType, this.attributeName);
|
||||
const attrs = this.prefixMatch ? becca.findAttributesWithPrefix(this.attributeType, this.attributeName) : becca.findAttributes(this.attributeType, this.attributeName);
|
||||
|
||||
const resultNoteSet = new NoteSet();
|
||||
|
||||
@@ -35,11 +32,9 @@ class AttributeExistsExp extends Expression {
|
||||
|
||||
if (attr.isInheritable && !this.isTemplateLabel) {
|
||||
resultNoteSet.addAll(note.getSubtreeNotesIncludingTemplated());
|
||||
}
|
||||
else if (note.isInherited() && !this.isTemplateLabel) {
|
||||
} else if (note.isInherited() && !this.isTemplateLabel) {
|
||||
resultNoteSet.addAll(note.getInheritingNotes());
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
resultNoteSet.add(note);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user