I currently have a html document in the following format:
<h1>a</h1>
<p>bla</p>
<p>more bla</p>
<h1>b</h1>
<p>different bla</p>
I am looking for a way to wrap both the <h1> and it’s following <p> inside a div, so it would look like:
<div>
<h1>a</h1>
<p>bla</p>
<p>more bla</p>
</div>
<div>
<h1>b</h1>
<p>different bla</p>
</div>
But I have been unsuccessful using wrap and wrapAll to achieve this.
Demo demo demo demo demo