From 6062a361f1d78031b07c9921d8de7141ca55b350 Mon Sep 17 00:00:00 2001 From: kate Date: Sun, 5 Feb 2023 21:45:32 +0800 Subject: [PATCH] fix: allow dash char in autocorrect content validation (#838) --- 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] === "@") {