mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fix "search in subtree", closes #941
This commit is contained in:
parent
dfb97d64f7
commit
42128c007f
@ -167,10 +167,10 @@ export default class SearchBoxWidget extends BasicWidget {
|
|||||||
this.$searchInput.val("");
|
this.$searchInput.val("");
|
||||||
}
|
}
|
||||||
|
|
||||||
searchInSubtreeEvent({noteId}) {
|
searchInSubtreeEvent({node}) {
|
||||||
noteId = noteId || appContext.tabManager.getActiveTabNoteId();
|
const noteId = node.data.noteId;
|
||||||
|
|
||||||
this.toggleInt(true);
|
this.showSearchEvent();
|
||||||
|
|
||||||
this.$searchInput.val(`@in=${noteId} @text*=*`);
|
this.$searchInput.val(`@in=${noteId} @text*=*`);
|
||||||
}
|
}
|
||||||
|
@ -390,19 +390,12 @@ async function saveLinks(note, content) {
|
|||||||
const foundLinks = [];
|
const foundLinks = [];
|
||||||
|
|
||||||
if (note.type === 'text') {
|
if (note.type === 'text') {
|
||||||
console.time("LINKS");
|
|
||||||
|
|
||||||
content = findImageLinks(content, foundLinks);
|
content = findImageLinks(content, foundLinks);
|
||||||
content = findInternalLinks(content, foundLinks);
|
content = findInternalLinks(content, foundLinks);
|
||||||
content = findExternalLinks(content, foundLinks);
|
content = findExternalLinks(content, foundLinks);
|
||||||
content = findIncludeNoteLinks(content, foundLinks);
|
content = findIncludeNoteLinks(content, foundLinks);
|
||||||
|
|
||||||
console.timeEnd("LINKS");
|
|
||||||
console.time("IMAGES");
|
|
||||||
|
|
||||||
content = await downloadImages(note.noteId, content);
|
content = await downloadImages(note.noteId, content);
|
||||||
|
|
||||||
console.timeEnd("IMAGES");
|
|
||||||
}
|
}
|
||||||
else if (note.type === 'relation-map') {
|
else if (note.type === 'relation-map') {
|
||||||
findRelationMapLinks(content, foundLinks);
|
findRelationMapLinks(content, foundLinks);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user