mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	convert   into whitespace also for large notes
This commit is contained in:
		| @@ -42,11 +42,11 @@ class NoteContentProtectedFulltextExp extends Expression { | |||||||
|  |  | ||||||
|             content = content.toLowerCase(); |             content = content.toLowerCase(); | ||||||
|  |  | ||||||
|             if (type === 'text' |             if (type === 'text' && mime === 'text/html') { | ||||||
|                 && mime === 'text/html' |                 if (content.length < 20000) { // striptags is slow for very large notes | ||||||
|                 && content.length < 20000 // striptags is very slow for large notes |  | ||||||
|             ) { |  | ||||||
|                     content = striptags(content); |                     content = striptags(content); | ||||||
|  |                 } | ||||||
|  |  | ||||||
|                 content = content.replace(/ /g, ' '); |                 content = content.replace(/ /g, ' '); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -28,11 +28,11 @@ class NoteContentUnprotectedFulltextExp extends Expression { | |||||||
|  |  | ||||||
|             content = content.toString().toLowerCase(); |             content = content.toString().toLowerCase(); | ||||||
|  |  | ||||||
|             if (type === 'text' |             if (type === 'text' && mime === 'text/html') { | ||||||
|                 && mime === 'text/html' |                 if (content.length < 20000) { // striptags is slow for very large notes | ||||||
|                 && content.length < 20000 // striptags is very slow for large notes |  | ||||||
|             ) { |  | ||||||
|                     content = striptags(content); |                     content = striptags(content); | ||||||
|  |                 } | ||||||
|  |  | ||||||
|                 content = content.replace(/ /g, ' '); |                 content = content.replace(/ /g, ' '); | ||||||
|             } |             } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user