match any letter in the cursor space except @

This commit is contained in:
GleidsonDaniel 2022-02-24 18:33:04 -03:00
parent e49f817272
commit e2b11e301e
1 changed files with 1 additions and 1 deletions

View File

@ -493,7 +493,7 @@ class MessageBox extends Component<IMessageBoxProps, IMessageBoxState> {
const msg = this.text;
const { start, end } = this.selection;
const cursor = Math.max(start, end);
const regexp = /([a-z0-9._-wа-я]+)$/im;
const regexp = /([^@]+)$/;
let result = msg.substr(0, cursor).replace(regexp, '');
// Remove the ! after select the canned response
if (trackingType === MENTIONS_TRACKING_TYPE_CANNED) {