mirror of
https://github.com/zadam/trilium.git
synced 2025-10-28 16:56:34 +01:00
hide hidden subtree notes from search results, closes #2361
This commit is contained in:
@@ -83,8 +83,12 @@ function findResultsWithExpression(expression, searchContext) {
|
|||||||
throw new Error(`Can't find note path for note ${JSON.stringify(note.getPojo())}`);
|
throw new Error(`Can't find note path for note ${JSON.stringify(note.getPojo())}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (notePathArray.includes("hidden")) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return new SearchResult(notePathArray);
|
return new SearchResult(notePathArray);
|
||||||
});
|
}).filter(Boolean);
|
||||||
|
|
||||||
for (const res of searchResults) {
|
for (const res of searchResults) {
|
||||||
res.computeScore(searchContext.highlightedTokens);
|
res.computeScore(searchContext.highlightedTokens);
|
||||||
|
|||||||
Reference in New Issue
Block a user