mirror of
https://github.com/stoatchat/for-legacy-web.git
synced 2026-03-07 09:25:27 +00:00
Allow dashes in regexp for valid values
This commit is contained in:
@@ -64,7 +64,7 @@ export function useAutoComplete(
|
|||||||
const cursor = el.selectionStart;
|
const cursor = el.selectionStart;
|
||||||
const content = el.value.slice(0, cursor);
|
const content = el.value.slice(0, cursor);
|
||||||
|
|
||||||
const valid = /\w/;
|
const valid = /[\w\-]/;
|
||||||
|
|
||||||
let j = content.length - 1;
|
let j = content.length - 1;
|
||||||
if (content[j] === "@") {
|
if (content[j] === "@") {
|
||||||
|
|||||||
Reference in New Issue
Block a user