From 48d5d41387c5a7b364df4cfc2f144194499f129a Mon Sep 17 00:00:00 2001 From: kate! Date: Mon, 30 Jan 2023 18:53:12 +0800 Subject: [PATCH] Allow dashes in regexp for valid values --- src/components/common/AutoComplete.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/AutoComplete.tsx b/src/components/common/AutoComplete.tsx index 0ba18214..72994842 100644 --- a/src/components/common/AutoComplete.tsx +++ b/src/components/common/AutoComplete.tsx @@ -64,7 +64,7 @@ export function useAutoComplete( const cursor = el.selectionStart; const content = el.value.slice(0, cursor); - const valid = /\w/; + const valid = /[\w\-]/; let j = content.length - 1; if (content[j] === "@") {