diff --git a/db/demo.zip b/db/demo.zip index 4b7cfed50..4de7753a3 100644 Binary files a/db/demo.zip and b/db/demo.zip differ diff --git a/src/services/import/zip.js b/src/services/import/zip.js index 951ccb306..cb4929165 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) {