mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Exclude <style> tags from quote and underscore italics processing
Fixes #3808
This commit is contained in:
@@ -459,7 +459,7 @@ export async function appendFileContent(message, messageText) {
|
||||
* @copyright https://github.com/kwaroran/risuAI
|
||||
*/
|
||||
export function encodeStyleTags(text) {
|
||||
const styleRegex = /<style>(.+?)<\/style>/gms;
|
||||
const styleRegex = /<style>(.+?)<\/style>/gims;
|
||||
return text.replaceAll(styleRegex, (_, match) => {
|
||||
return `<custom-style>${escape(match)}</custom-style>`;
|
||||
});
|
||||
|
Reference in New Issue
Block a user