mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 05:28:59 +01:00 
			
		
		
		
	possible fix to "double new lines"
This commit is contained in:
		
							parent
							
								
									f19c972d26
								
							
						
					
					
						commit
						36e5259527
					
				@ -1,4 +1,7 @@
 | 
			
		||||
function html2notecase(contents, note) {
 | 
			
		||||
    // remove any possible extra newlines which might be inserted - all relevant new lines should be only in <br> and <p>
 | 
			
		||||
    contents = contents.replace(/(?:\r\n|\r|\n)/, '');
 | 
			
		||||
 | 
			
		||||
    contents = contents.replace(/<br \/>/g, '\n');
 | 
			
		||||
    contents = contents.replace(/<br>/g, '\n');
 | 
			
		||||
    contents = contents.replace(/<\/p>/g, '\n');
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user