Skip to content

Commit

Permalink
fix(markup): correct key formatting for codemirror keymap (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
d3m1d0v authored Nov 2, 2024
1 parent 28bc59f commit 2f8f91d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
17 changes: 0 additions & 17 deletions src/shortcuts/chars.ts

This file was deleted.

6 changes: 1 addition & 5 deletions src/shortcuts/formatter.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {isMac} from '../utils/platform';

import {cmChars} from './chars';
import {ModKey as MK} from './const';
import {Defs, PlatfrormDefs} from './types';

Expand Down Expand Up @@ -28,10 +27,7 @@ class ShortCutFormatter {
toCM(name: string): string | null {
const defs = this.#map.get(name);
if (!defs) return null;
return defs
.map((str) => cmChars[str] ?? str)
.sort((a) => (a === MK.Shift ? -1 : 0))
.join('-');
return defs.sort((a) => (a === MK.Shift ? -1 : 0)).join('-');
}

toView(name: string): string | undefined {
Expand Down

0 comments on commit 2f8f91d

Please sign in to comment.