mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader.git
synced 2025-08-19 18:29:09 +08:00
fix: remove tailwind classes instead of the opposite
This commit is contained in:
parent
434c6707fd
commit
4e299bf8e2
@ -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) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user