From 4cc2695d84181ae51750316a598fb7f910c366c9 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Mon, 21 Aug 2023 15:37:57 -0500 Subject: [PATCH] allow handles to start with a number (#1231) * allow handles to start with a number * don't allow leading hyphen --- src/lib/strings/handles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/strings/handles.ts b/src/lib/strings/handles.ts index 3c01d934..6ce46243 100644 --- a/src/lib/strings/handles.ts +++ b/src/lib/strings/handles.ts @@ -3,7 +3,7 @@ export function makeValidHandle(str: string): string { str = str.slice(0, 20) } str = str.toLowerCase() - return str.replace(/^[^a-z]+/g, '').replace(/[^a-z0-9-]/g, '') + return str.replace(/^[^a-z0-9]+/g, '').replace(/[^a-z0-9-]/g, '') } export function createFullHandle(name: string, domain: string): string {