Fix background css breaking

This commit is contained in:
kwaroran
2024-11-05 23:15:45 +09:00
parent 67f6d99640
commit a0c2c65a31

View File

@@ -478,7 +478,9 @@ function decodeStyle(text:string){
return text.replaceAll(styleDecodeRegex, (full, txt:string) => {
try {
const ast = css.parse(Buffer.from(txt, 'hex').toString('utf-8'))
let text = Buffer.from(txt, 'hex').toString('utf-8')
text = risuChatParser(text)
const ast = css.parse(text)
const rules = ast?.stylesheet?.rules
if(rules){
for(let i=0;i<rules.length;i++){