Exclude <style> tags from quote and underscore italics processing

Fixes #3808
This commit is contained in:
Cohee
2025-04-04 13:53:56 +00:00
parent c7ce0fe66a
commit 7987f02dee
3 changed files with 6 additions and 6 deletions

View File

@@ -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>`;
});