* 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.
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;