mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	fix parsing links without any attributes after href
This commit is contained in:
		
							parent
							
								
									de971d5db5
								
							
						
					
					
						commit
						f063d12d07
					
				@ -81,9 +81,11 @@ function html2notecase(contents, note) {
 | 
				
			|||||||
                }
 | 
					                }
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            const linkMatch = /^<a[^>]+?href="([^"]+?)"[^>]+?>([^<]+?)<\/a>/.exec(curContent);
 | 
					            const linkMatch = /^<a[^>]+?href="([^"]+?)"[^>]*?>([^<]+?)<\/a>/.exec(curContent);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (linkMatch !== null) {
 | 
					            if (linkMatch !== null) {
 | 
				
			||||||
 | 
					                console.log("matched link: ", linkMatch);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                const targetUrl = linkMatch[1];
 | 
					                const targetUrl = linkMatch[1];
 | 
				
			||||||
                const linkText = linkMatch[2];
 | 
					                const linkText = linkMatch[2];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user