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

Support splitting nodes while traversin #447

Merged
merged 3 commits into from
Feb 24, 2023
Merged

Conversation

martosaur
Copy link
Contributor

Hi! This PR adds support for returning a list of nodes in Floki.traverse_and_update.

The use case for this is if we want to replace an inline element with a block-level one, i.e.

<p>Code: <code>IO.inspect</code></p>

->

<p>Code:</p>
<pre>IO.inspect</pre>

lib/floki/traversal.ex Outdated Show resolved Hide resolved
@philss philss merged commit 9f89380 into philss:main Feb 24, 2023
@philss
Copy link
Owner

philss commented Feb 24, 2023

@martosaur thank you! 💜

@martosaur martosaur deleted the split_nodes branch May 27, 2024 19:11
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

Successfully merging this pull request may close these issues.

None yet

2 participants