I've been puzzling over this one for days.
I have a CMS that sometimes doesn't put text inside of a paragraph when it should. I have no control over the produced HTML. Say I have multiple divs on the page that look like this:
<div class="myclass">
Unparented text
<p>Parented text</p>
More unparented text
<p>More parented text</p>
</div>
How would I update the div so that each section of unparented text is surrounded in its own <p>
tag?