Fix commands activating anywhere in the input (#156)
* Fix commands activating anywhere in the input Writing `The command to leave a channel is /leave` might have had "fun" consequences for users. Fixes #155 * Fix go-to commands activating anywhere in the input While less obtrusive than `/` commands activating anywhere, it seems logical to only activate completion of those when at the beginning of the input.
This commit is contained in:
parent
fb5a54dd17
commit
3776e32364
1 changed files with 1 additions and 1 deletions
|
@ -29,7 +29,7 @@ import MarkdownIC from '../../../../public/res/ic/outlined/markdown.svg';
|
|||
import FileIC from '../../../../public/res/ic/outlined/file.svg';
|
||||
import CrossIC from '../../../../public/res/ic/outlined/cross.svg';
|
||||
|
||||
const CMD_REGEX = /(\/|>[#*@]|:|@)(\S*)$/;
|
||||
const CMD_REGEX = /(^\/|^>[#*@]|:|@)(\S*)$/;
|
||||
let isTyping = false;
|
||||
let isCmdActivated = false;
|
||||
let cmdCursorPos = null;
|
||||
|
|
Loading…
Reference in a new issue