mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-26 16:57:07 +08:00
allowing round brackets in font names
This commit is contained in:
parent
7f8298c0d2
commit
d0c93f3409
1 changed files with 1 additions and 2 deletions
|
|
@ -2,7 +2,6 @@ import * as DB from "./db";
|
|||
import * as OutOfFocus from "./test/out-of-focus";
|
||||
import * as Notifications from "./elements/notifications";
|
||||
import {
|
||||
isConfigKeyValid,
|
||||
isConfigValueValid,
|
||||
isConfigValueValidAsync,
|
||||
} from "./config-validation";
|
||||
|
|
@ -1233,7 +1232,7 @@ export function setFontFamily(font: string, nosave?: boolean): boolean {
|
|||
}
|
||||
);
|
||||
}
|
||||
if (!isConfigKeyValid(font)) {
|
||||
if (!font || !/^[0-9a-zA-Z_.\-#+()]+$/.test(font)) {
|
||||
Notifications.add(`Invalid font name value: "${font}".`, -1, {
|
||||
customTitle: "Custom font",
|
||||
duration: 3,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue