mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-02-18 13:29:36 +01:00
fix: stop using lookbehind for backwards compat (#7824)
This commit is contained in:
parent
550a388b2b
commit
1d71f84515
@ -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>
|
||||
);
|
||||
})}
|
||||
|
Loading…
Reference in New Issue
Block a user