Fix for quotes inside code blocks

Also added quote color to default themes.
This commit is contained in:
Halsey1006
2023-04-24 08:01:36 -07:00
committed by GitHub
parent 577fe28eca
commit aa95071e20
4 changed files with 32 additions and 2 deletions

View File

@ -884,7 +884,13 @@ function messageFormating(mes, ch_name, isSystem, forceAvatar) {
mes = mes.replace(/{{(\*?.+?\*?)}}/g, "");
mes = mes.replace(/\"(.+?)\"/g, "<q>$1</q>")
mes = mes.replace(/(<code[^>]*>[\s\S]*?<\/code>)|\"(.+?)\"/g, function(match, code, quote) {
if (code) {
return code;
} else {
return "<q>" + quote + "</q>";
}
});
mes = mes.replace(/\n/g, "<br/>");
mes = mes.trim();

8
themes/Aqua Blue.json Normal file
View File

@ -0,0 +1,8 @@
{
"name": "Aqua Blue",
"blur_strength": 2,
"main_text_color": "rgba(160, 190, 190, 1)",
"italics_text_color": "rgba(170, 200, 200, 1)",
"fastui_bg_color": "rgba(7, 54, 66, 0.9)",
"blur_tint_color": "rgba(0, 43, 54, 0.8)"
}

View File

@ -0,0 +1,8 @@
{
"name": "Default (Dark)",
"blur_strength": 10,
"main_text_color": "rgb(220, 220, 210)",
"italics_text_color": "rgb(175, 175, 175)",
"fastui_bg_color": "rgba(0, 0, 0, 0.9)",
"blur_tint_color": "rgba(0, 0, 0, 0.5)"
}

8
themes/Megumin Red.json Normal file
View File

@ -0,0 +1,8 @@
{
"name": "Megumin Red",
"blur_strength": 10,
"main_text_color": "rgba(230, 230, 230, 1)",
"italics_text_color": "rgba(200, 200, 200, 1)",
"fastui_bg_color": "rgba(70, 5, 5, 0.9)",
"blur_tint_color": "rgba(50, 10, 10, 0.75)"
}