mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix code block parsing #116
This commit is contained in:
@ -878,7 +878,7 @@ function messageFormating(mes, ch_name, isSystem, forceAvatar) {
|
|||||||
mes = mes.replace(/\n/g, "<br/>");
|
mes = mes.replace(/\n/g, "<br/>");
|
||||||
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) {
|
||||||
return match.replace(/&/g, '&');
|
return match.replace(/&/g, '&');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user