diff --git a/public/script.js b/public/script.js index 264cc9ab1..20115125b 100644 --- a/public/script.js +++ b/public/script.js @@ -1062,12 +1062,18 @@ function messageFormatting(mes, ch_name, isSystem, isUser) { return match; } }); + mes = mes.replaceAll('\\begin{align*}', '$$'); mes = mes.replaceAll('\\end{align*}', '$$'); mes = converter.makeHtml(mes); mes = mes.replace(/{{(\*?.*\*?)}}/g, ""); + mes = mes.replace(/[\s\S]*?<\/code>/g, function (match) { + // Firefox creates extra newlines from
s in code blocks, so we replace them before converting newlines to
s. + return match.replace(/\n/gm, '\u0000'); + }) mes = mes.replace(/\n/g, "
"); + mes = mes.replace(/\u0000/g, "\n"); // Restore converted newlines mes = mes.trim(); mes = mes.replace(/[\s\S]*?<\/code>/g, function (match) { diff --git a/public/style.css b/public/style.css index 533142fa7..c5306392d 100644 --- a/public/style.css +++ b/public/style.css @@ -1339,6 +1339,14 @@ input[type=search]:focus::-webkit-search-cancel-button { 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 { justify-content: space-between; }