mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08: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; |                     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) { |         if (type === 'relation-map' && noteMeta) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 zadam
						zadam