fixed unselectable quotes

This commit is contained in:
RossAscends
2023-04-30 18:20:09 +09:00
parent 9c3d229c2d
commit a47f21abc0
2 changed files with 8 additions and 2 deletions

View File

@ -917,14 +917,14 @@ function messageFormating(mes, ch_name, isSystem, forceAvatar) {
if (this_chid != undefined && !isSystem)
mes = mes.replaceAll("<", "&lt;").replaceAll(">", "&gt;"); //for welcome message
if ((this_chid === undefined || this_chid == "invalid-safety-id") && !selected_group) {
if ((this_chid === undefined || this_chid == "invalid-safety-id") && !selected_group) {
mes = mes
.replace(/\*\*(.+?)\*\*/g, "<b>$1</b>")
.replace(/\n/g, "<br/>");
} else if (!isSystem) {
mes = mes.replace(/```[\s\S]*?```|``[\s\S]*?``|`[\s\S]*?`|(\".+?\")/gm, function (match, p1) {
if (p1) {
return "<q>" + p1.replace(/\"/g, "") + "</q>";
return '<q>"' + p1.replace(/\"/g, "") + '"</q>';
} else {
return match;
}