small improvements and fixes

This commit is contained in:
zadam
2020-08-06 23:55:17 +02:00
parent f60af1f05e
commit 02cc52af66
12 changed files with 22 additions and 20 deletions

View File

@@ -170,11 +170,11 @@ class Note {
}
}
this.flatTextCache += this.title;
this.flatTextCache += this.title + ' ';
for (const attr of this.attributes) {
// it's best to use space as separator since spaces are filtered from the search string by the tokenization into words
this.flatTextCache += (attr.type === 'label' ? '#' : '@') + attr.name;
this.flatTextCache += ' ' + (attr.type === 'label' ? '#' : '@') + attr.name;
if (attr.value) {
this.flatTextCache += '=' + attr.value;
@@ -182,6 +182,8 @@ class Note {
}
this.flatTextCache = this.flatTextCache.toLowerCase();
console.log(this.flatTextCache);
}
return this.flatTextCache;