File tree Expand file tree Collapse file tree 3 files changed +9
-6
lines changed
packages/contracts/src/schemas Expand file tree Collapse file tree 3 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -439,8 +439,8 @@ describe("Config", () => {
439439 it ( "setKeymapLayout" , ( ) => {
440440 expect ( Config . setKeymapLayout ( "overrideSync" ) ) . toBe ( true ) ;
441441 expect ( Config . setKeymapLayout ( "override_sync" ) ) . toBe ( true ) ;
442- expect ( Config . setKeymapLayout ( "override sync" ) ) . toBe ( true ) ;
443- expect ( Config . setKeymapLayout ( "override-sync!" ) ) . toBe ( true ) ;
442+ expect ( Config . setKeymapLayout ( "override sync" ) ) . toBe ( false ) ;
443+ expect ( Config . setKeymapLayout ( "override-sync!" ) ) . toBe ( false ) ;
444444 expect ( Config . setKeymapLayout ( stringOfLength ( 50 ) ) ) . toBe ( true ) ;
445445
446446 expect ( Config . setKeymapLayout ( stringOfLength ( 51 ) ) ) . toBe ( false ) ;
@@ -451,7 +451,7 @@ describe("Config", () => {
451451 expect ( Config . setLayout ( stringOfLength ( 50 ) ) ) . toBe ( true ) ;
452452
453453 expect ( Config . setLayout ( "semi mak" ) ) . toBe ( false ) ;
454- expect ( Config . setLayout ( "semi-mak" ) ) . toBe ( false ) ;
454+ expect ( Config . setLayout ( "semi-mak" ) ) . toBe ( true ) ;
455455 expect ( Config . setLayout ( stringOfLength ( 51 ) ) ) . toBe ( false ) ;
456456 } ) ;
457457 it ( "setFontSize" , ( ) => {
Original file line number Diff line number Diff line change 14191419 "row5" : [" " ]
14201420 }
14211421 },
1422- "3l " : {
1422+ "3l" : {
14231423 "keymapShowTopRow" : false ,
14241424 "type" : " ansi" ,
14251425 "keys" : {
Original file line number Diff line number Diff line change @@ -265,10 +265,13 @@ export type ThemeName = z.infer<typeof ThemeNameSchema>;
265265export const KeymapLayoutSchema = z
266266 . string ( )
267267 . max ( 50 )
268- . regex ( / [ \w \ -_ ] + / ) ;
268+ . regex ( / ^ [ a - z A - Z 0 - 9 \ -_ ] + $ / gi ) ;
269269export type KeymapLayout = z . infer < typeof KeymapLayoutSchema > ;
270270
271- export const LayoutSchema = token ( ) . max ( 50 ) ;
271+ export const LayoutSchema = z
272+ . string ( )
273+ . max ( 50 )
274+ . regex ( / ^ [ a - z A - Z 0 - 9 \- _ ] + $ / gi) ;
272275export type Layout = z . infer < typeof LayoutSchema > ;
273276
274277export const FontSizeSchema = z . number ( ) . positive ( ) ;
You can’t perform that action at this time.
0 commit comments