From ef02f13ef4a3614e07160431fb874a79d6e1742d Mon Sep 17 00:00:00 2001 From: Marcus Noble Date: Mon, 9 Nov 2020 21:19:15 +0000 Subject: [PATCH] Filter out empty paragraphs --- views/static/feed-item.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/views/static/feed-item.js b/views/static/feed-item.js index 92c6129..e89eeee 100644 --- a/views/static/feed-item.js +++ b/views/static/feed-item.js @@ -64,6 +64,11 @@ class FeedItem extends HTMLElement { [...this.shadowRoot.querySelectorAll('a[href^=http]')].forEach(a => { a.setAttribute("target", "_blank"); a.setAttribute("rel", "noopener"); + }); + [...this.shadowRoot.querySelectorAll('p')].forEach(p => { + if (p.innerText.trim() == "") { + p.remove(); + } }) })