Hello,
I need to wrap everything, including free text, that is between two <hr>
elements.
Given this source:
<hr class=begin>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<a href=mauris.html>Mauris</a> id diam turpis, et faucibus nunc.
<div><img src=foo.png /></div>
<hr class=end>
I need to wrap everything between the hr.begin
and hr.end
tags, like so:
<hr class=begin>
<div class=content>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
<a href=mauris.html>Mauris</a> id diam turpis, et faucibus nunc.
<div><img src=foo.png /></div>
</div>
<hr class=end>
I cannot use a method like .nextUntil('hr.end')
because this will not select the untagged text.