From 1d71f84515cee70809f36428bd91fa50f9b94cbc Mon Sep 17 00:00:00 2001 From: David Luzar <5153846+dwelle@users.noreply.github.com> Date: Thu, 28 Mar 2024 17:32:38 +0100 Subject: [PATCH] fix: stop using lookbehind for backwards compat (#7824) --- .../components/CommandPalette/CommandPalette.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/excalidraw/components/CommandPalette/CommandPalette.tsx b/packages/excalidraw/components/CommandPalette/CommandPalette.tsx index e8fdb1b96..d7ed691c5 100644 --- a/packages/excalidraw/components/CommandPalette/CommandPalette.tsx +++ b/packages/excalidraw/components/CommandPalette/CommandPalette.tsx @@ -91,13 +91,14 @@ const CommandShortcutHint = ({ className?: string; children?: React.ReactNode; }) => { - const shortcuts = shortcut.split(/(? - {shortcuts.map((item) => { + {shortcuts.map((item, idx) => { return (
-
{item}
+
{item === "$" ? "+" : item}
); })}