fix: remove tailwind classes instead of the opposite

This commit is contained in:
Yanlong Wang 2025-03-08 13:30:06 +08:00
parent 434c6707fd
commit 4e299bf8e2
No known key found for this signature in database
GPG Key ID: C0A623C0BADF9F37

View File

@ -287,7 +287,7 @@ export class JSDomControl extends AsyncService {
jsdom.window.document.querySelectorAll('[class]').forEach((x) => {
const classes = x.getAttribute('class')?.split(/\s+/g) || [];
const newClasses = classes.filter((c) => tailwindClasses.has(c));
const newClasses = classes.filter((c) => !tailwindClasses.has(c));
x.setAttribute('class', newClasses.join(' '));
});
jsdom.window.document.querySelectorAll('[style]').forEach((x) => {