Virtual whiteboard for sketching hand-drawn like diagrams
fix: stop using lookbehind for backwards compat (#7824)
David Luzar1d71f84515ce
diff --git a/packages/excalidraw/components/CommandPalette/CommandPalette.tsx b/packages/excalidraw/components/CommandPalette/CommandPalette.tsxindex e8fdb1b96d..d7ed691c56 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(/(?<!\+)(?:\+)/g);+ const shortcuts = shortcut.replace("++", "+$").split("+");+return (<div className={clsx("shortcut", className)}>- {shortcuts.map((item) => {+ {shortcuts.map((item, idx) => {return (<div className="shortcut-wrapper" key={item}>- <div className="shortcut-key">{item}</div>+ <div className="shortcut-key">{item === "$" ? "+" : item}</div></div>);})}