Bugfix: keep A elements when there is an image inside

This commit is contained in:
the-djmaze 2022-08-29 10:54:55 +02:00
parent ea4f678d05
commit a80161a316

View file

@ -136,7 +136,7 @@ export const
}
// if (['CENTER','FORM'].includes(name)) {
if ('FORM' === name || 'O:P' === name || (nonEmptyTags.includes(name) && ('' == oElement.textContent.trim()))) {
replaceWithChildren(oElement);
('A' !== name || !oElement.querySelector('IMG')) && replaceWithChildren(oElement);
return;
}
/*