diff --git a/files/assets/js/emoji_modal/inline_group_modal.js b/files/assets/js/emoji_modal/inline_group_modal.js index 28770c307..1d30330e2 100644 --- a/files/assets/js/emoji_modal/inline_group_modal.js +++ b/files/assets/js/emoji_modal/inline_group_modal.js @@ -108,7 +108,7 @@ function populate_inline_group_modal(results, textbox) group_option.addEventListener('click', () => { close_inline_emoji_modal() - textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `!${name}`) + textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `!${name} `) textbox.focus() if (typeof markdown === "function" && textbox.dataset.preview) { markdown(textbox) diff --git a/files/assets/js/emoji_modal/inline_user_modal.js b/files/assets/js/emoji_modal/inline_user_modal.js index 362b7b6b1..b73f30ef6 100644 --- a/files/assets/js/emoji_modal/inline_user_modal.js +++ b/files/assets/js/emoji_modal/inline_user_modal.js @@ -113,7 +113,7 @@ function populate_inline_user_modal(results, textbox) user_option.addEventListener('click', () => { close_inline_emoji_modal() - textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `@${name}`) + textbox.value = textbox.value.replace(new RegExp(current_word+"(?=\\s|$)", "gi"), `@${name} `) textbox.focus() if (typeof markdown === "function" && textbox.dataset.preview) { markdown(textbox)