mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
convert into whitespace also for large notes
This commit is contained in:
parent
a266d6a3d5
commit
577dc95ab8
@ -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, ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user