Workaround für random <p> Tag Generierung bei gemixtem Content in Shortcodes vorläufig implementiert

This commit is contained in:
Andreas Hnida 2024-03-21 14:55:21 +01:00
commit 0621d47b86

10
assets/js/custom.js Normal file
View file

@ -0,0 +1,10 @@
function removeEmptyParagraphs() {
const paragraphs = document.querySelectorAll('p');
paragraphs.forEach(paragraph => {
if (!paragraph.textContent.trim() && !paragraph.querySelector('i')) {
paragraph.remove();
}
});
}
removeEmptyParagraphs();