deface
deface copied to clipboard
Rewrap contents
Is there any way to rewrap contents? I. e. I have original
<p class="some-class">
<!-- contents -->
</p>
How can I achieve this with deface?
<div class="some-another-class">
<!-- contents -->
</div>
@gsmetal see https://github.com/spree/deface#action, I think you can use surround or surround_contents for that use case.
@tenshiAMD No, with surround the result will be
<div class="some-another-class">
<p class="some-class">
<!-- contents -->
</p>
</div>
And with surround_contents it will be
<p class="some-class">
<div class="some-another-class">
<!-- contents -->
</div>
</p>
But I need to replace original wrapper with another one with same contents.