From 55dce861535d58dba8670f64ec8559f0346a7a1c Mon Sep 17 00:00:00 2001 From: Marcus Eide Date: Wed, 21 Apr 2021 13:54:41 +0200 Subject: [PATCH] Keep wordboundary when getting the icon text Signed-off-by: Marcus Eide --- plugins/shortcuts/src/ShortcutItem.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/shortcuts/src/ShortcutItem.tsx b/plugins/shortcuts/src/ShortcutItem.tsx index a52194828c..3aec4bb3b4 100644 --- a/plugins/shortcuts/src/ShortcutItem.tsx +++ b/plugins/shortcuts/src/ShortcutItem.tsx @@ -36,7 +36,7 @@ const getIconText = (title: string) => title[0].toUpperCase() + title[1].toLowerCase() : // If there's more than one word, take the first character of the first two words title - .replace(/\W+/g, ' ') + .replace(/\B\W/g, '') .split(' ') .map(s => s[0]) .join('')