Update index.tsx

This commit is contained in:
Gleidson Daniel Silva 2022-02-24 22:26:01 -03:00 committed by GitHub
parent e2b11e301e
commit c0935c1c0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 = /([^@]+)$/;
const regexp = /(?!^)[^]/g;
let result = msg.substr(0, cursor).replace(regexp, '');
// Remove the ! after select the canned response
if (trackingType === MENTIONS_TRACKING_TYPE_CANNED) {