mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-21 13:23:07 +01:00
fix: fixes a bug when searching for multiple words in fuzzy popup (#3000)
This commit is contained in:
@@ -185,6 +185,7 @@ function matchedName({ item, matches = [] }: FuseResult<Item>) {
|
||||
const result = [];
|
||||
let lastIndex = 0;
|
||||
for (const [start, end] of indices) {
|
||||
if (lastIndex > start) continue;
|
||||
result.push(item.name.slice(lastIndex, start));
|
||||
result.push(`<mark>${item.name.slice(start, end + 1)}</mark>`);
|
||||
lastIndex = end + 1;
|
||||
|
||||
Reference in New Issue
Block a user