JSFiddle - React, Tailwind, and code Playground
by Sub Lines
HTML
<p></p>
<div class="test">
<p> </p>
<p> </p>
<p>
</p>
</div>
<p>Where is pancakes house?</p>
CSS
p {
margin: 1em;
border: 1px solid red;
}
JavaScript
$('.test p').each(function() {
var $this = $(this);
if($this.html().replace(/\s| /g, '').length == 0)
$this.remove();
});