1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-09-25 04:51:29 +02:00

highlight boundary always produces preceding ellipsis #508

This commit is contained in:
Thomas Wilkerling
2025-09-01 14:14:31 +02:00
parent c28f52c09b
commit 338bed25c1
23 changed files with 82 additions and 40 deletions

View File

@@ -433,7 +433,7 @@ export function highlight_fields(query, result, index, pluck, config) {
str = "";
for (let k = 0, tmp; k < final.length; k++) {
tmp = (k && seamless[k] ? " " : (k && !ellipsis ? " " : "") + ellipsis) + final[k];
tmp = (seamless[k] ? k ? " " : "" : (k && !ellipsis ? " " : "") + ellipsis) + final[k];
str += tmp;
}
if (ellipsis && !seamless[final.length]) {