Skip to content

Commit

Permalink
Merge branch 'dwelle/fix-command-palette-filter' of https://github.co…
Browse files Browse the repository at this point in the history
  • Loading branch information
dwelle committed May 3, 2024
2 parents cbb5d6b + f25a126 commit 265874e
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -541,7 +541,7 @@ function CommandPaletteInner({
...command,
icon: command.icon || boltIcon,
order: command.order ?? getCategoryOrder(command.category),
haystack: `${deburr(command.label)} ${
haystack: `${deburr(command.label.toLocaleLowerCase())} ${
command.keywords?.join(" ") || ""
}`,
};
Expand Down Expand Up @@ -778,7 +778,9 @@ function CommandPaletteInner({
return;
}

const _query = deburr(commandSearch.replace(/[<>-_| ]/g, ""));
const _query = deburr(
commandSearch.toLocaleLowerCase().replace(/[<>_| -]/g, ""),
);
matchingCommands = fuzzy
.filter(_query, matchingCommands, {
extract: (command) => command.haystack,
Expand Down

0 comments on commit 265874e

Please sign in to comment.