From 977a22057a8db4b1c2a5a9a929443baacec1c848 Mon Sep 17 00:00:00 2001 From: kate! Date: Mon, 30 Jan 2023 19:00:54 +0800 Subject: [PATCH] Fix dash char in autocorrect content validation --- 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] === "@") {