mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'dev' of https://github.com/Cohee1207/SillyTavern into dev
This commit is contained in:
@ -1062,12 +1062,18 @@ function messageFormatting(mes, ch_name, isSystem, isUser) {
|
|||||||
return match;
|
return match;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
mes = mes.replaceAll('\\begin{align*}', '$$');
|
mes = mes.replaceAll('\\begin{align*}', '$$');
|
||||||
mes = mes.replaceAll('\\end{align*}', '$$');
|
mes = mes.replaceAll('\\end{align*}', '$$');
|
||||||
mes = converter.makeHtml(mes);
|
mes = converter.makeHtml(mes);
|
||||||
mes = mes.replace(/{{(\*?.*\*?)}}/g, "");
|
mes = mes.replace(/{{(\*?.*\*?)}}/g, "");
|
||||||
|
|
||||||
|
mes = mes.replace(/<code(.*)>[\s\S]*?<\/code>/g, function (match) {
|
||||||
|
// Firefox creates extra newlines from <br>s in code blocks, so we replace them before converting newlines to <br>s.
|
||||||
|
return match.replace(/\n/gm, '\u0000');
|
||||||
|
})
|
||||||
mes = mes.replace(/\n/g, "<br/>");
|
mes = mes.replace(/\n/g, "<br/>");
|
||||||
|
mes = mes.replace(/\u0000/g, "\n"); // Restore converted newlines
|
||||||
mes = mes.trim();
|
mes = mes.trim();
|
||||||
|
|
||||||
mes = mes.replace(/<code(.*)>[\s\S]*?<\/code>/g, function (match) {
|
mes = mes.replace(/<code(.*)>[\s\S]*?<\/code>/g, function (match) {
|
||||||
|
@ -1339,6 +1339,14 @@ input[type=search]:focus::-webkit-search-cancel-button {
|
|||||||
margin-top: -5px;
|
margin-top: -5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body.big-avatars .ch_description {
|
||||||
|
display: -webkit-box;
|
||||||
|
-webkit-line-clamp: 3;
|
||||||
|
-webkit-box-orient: vertical;
|
||||||
|
white-space: normal;
|
||||||
|
text-overflow: unset;
|
||||||
|
}
|
||||||
|
|
||||||
.justifySpaceBetween {
|
.justifySpaceBetween {
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user