Skip to content

Build your personal knowledge base with Trilium Notes

fix "search in subtree", closes #941

zadam42128c007fa1
diff --git a/src/public/javascripts/widgets/search_box.js b/src/public/javascripts/widgets/search_box.js
index d532026715..f0f729dfbc 100644
--- a/src/public/javascripts/widgets/search_box.js
+++ b/src/public/javascripts/widgets/search_box.js
@@ -167,10 +167,10 @@ export default class SearchBoxWidget extends BasicWidget {
this.$searchInput.val("");
}
- searchInSubtreeEvent({noteId}) {
- noteId = noteId || appContext.tabManager.getActiveTabNoteId();
+ searchInSubtreeEvent({node}) {
+ const noteId = node.data.noteId;
- this.toggleInt(true);
+ this.showSearchEvent();
this.$searchInput.val(`@in=${noteId} @text*=*`);
}
diff --git a/src/services/notes.js b/src/services/notes.js
index 49de14d59b..c312296ec0 100644
--- a/src/services/notes.js
+++ b/src/services/notes.js
@@ -390,19 +390,12 @@ async function saveLinks(note, content) {
const foundLinks = [];
if (note.type === 'text') {
- console.time("LINKS");
-
content = findImageLinks(content, foundLinks);
content = findInternalLinks(content, foundLinks);
content = findExternalLinks(content, foundLinks);
content = findIncludeNoteLinks(content, foundLinks);
- console.timeEnd("LINKS");
- console.time("IMAGES");
-
content = await downloadImages(note.noteId, content);
-
- console.timeEnd("IMAGES");
}
else if (note.type === 'relation-map') {
findRelationMapLinks(content, foundLinks);