aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/CommandPalette/CommandPalette.svelte9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/CommandPalette/CommandPalette.svelte b/src/lib/CommandPalette/CommandPalette.svelte
index 6bea98ab..cdf962d7 100644
--- a/src/lib/CommandPalette/CommandPalette.svelte
+++ b/src/lib/CommandPalette/CommandPalette.svelte
@@ -21,8 +21,13 @@
});
const doesActionMatch = (action: CommandPaletteAction) =>
- action.name.toLowerCase().includes(search.toLowerCase()) ||
- action.tags?.some((tag) => tag.toLowerCase().includes(search.toLowerCase()));
+ action.name
+ .toLowerCase()
+ .replace(/\s+/g, '')
+ .includes(search.toLowerCase().replace(/\s+/g, '')) ||
+ action.tags?.some((tag) =>
+ tag.toLowerCase().replace(/\s+/g, '').includes(search.toLowerCase().replace(/\s+/g, ''))
+ );
filtered = [];