Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix ZIP import of notes with included note
zadamc063f75f48f8
diff --git a/db/demo.zip b/db/demo.zipindex 4b7cfed50c..4de7753a34 100644Binary files a/db/demo.zip and b/db/demo.zip differdiff --git a/src/services/import/zip.js b/src/services/import/zip.jsindex 951ccb3063..cb49291654 100644--- a/src/services/import/zip.js+++ b/src/services/import/zip.js@@ -317,6 +317,14 @@ async function importZip(taskContext, fileBuffer, importRootNote) {return match;}});++ const includeNoteLinks = (noteMeta.attributes || [])+ .filter(attr => attr.type === 'relation' && attr.name === 'includeNoteLink');++ for (const link of includeNoteLinks) {+ // no need to escape the regexp find string since it's a noteId which doesn't contain any special characters+ content = content.replace(new RegExp(link.value, "g"), getNewNoteId(link.value));+ }}if (type === 'relation-map' && noteMeta) {