Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrap contents #187

Open
gsmetal opened this issue Mar 19, 2019 · 2 comments
Open

Rewrap contents #187

gsmetal opened this issue Mar 19, 2019 · 2 comments

Comments

@gsmetal
Copy link

gsmetal commented Mar 19, 2019

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>
@tenshiAMD
Copy link

@gsmetal see https://github.com/spree/deface#action, I think you can use surround or surround_contents for that use case.

@gsmetal
Copy link
Author

gsmetal commented Oct 31, 2019

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants