fix ZIP import of notes with included note

This commit is contained in:
zadam 2020-04-06 22:46:11 +02:00
parent 2d1f3b7633
commit c063f75f48
2 changed files with 8 additions and 0 deletions

Binary file not shown.

View File

@ -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) {