mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix ZIP import of notes with included note
This commit is contained in:
parent
2d1f3b7633
commit
c063f75f48
BIN
db/demo.zip
BIN
db/demo.zip
Binary file not shown.
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user