From 7c4f06e4d9ab69f5b34d41d71e54f4827441697c Mon Sep 17 00:00:00 2001 From: SillyLossy Date: Tue, 28 Mar 2023 18:49:50 +0300 Subject: [PATCH] Apply full markdown to group messages --- public/script.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/script.js b/public/script.js index 44d080160..038597788 100644 --- a/public/script.js +++ b/public/script.js @@ -770,7 +770,7 @@ function messageFormating(mes, ch_name, isSystem, forceAvatar) { if (this_chid != undefined && !isSystem) mes = mes.replaceAll("<", "<").replaceAll(">", ">"); //for welcome message - if (this_chid === undefined) { + if (this_chid === undefined && !selected_group) { mes = mes .replace(/\*\*(.+?)\*\*/g, "$1") .replace(/\*(.+?)\*/g, "$1") @@ -2365,7 +2365,7 @@ function messageEditDone(div) { mesBlock.find(".mes_text").empty(); mesBlock.find(".mes_edit_buttons").css("display", "none"); mesBlock.find(".mes_edit").css("display", "inline-block"); - mesBlock.find(".mes_text").append(messageFormating(text, this_edit_mes_chname)); + mesBlock.find(".mes_text").append(messageFormating(text, this_edit_mes_chname, chat[this_edit_mes_id].is_system, chat[this_edit_mes_id].force_avatar)); mesBlock.find(".mes_bias").empty(); mesBlock.find(".mes_bias").append(messageFormating(bias)); appendImageToMessage(chat[this_edit_mes_id], div.closest(".mes"));