Skip to content
This repository has been archived by the owner on Oct 17, 2021. It is now read-only.

Enhancement: Also provide a replace method on a node with children #15

Closed
Lukas-Stuehrk opened this issue Apr 30, 2020 · 1 comment · Fixed by #26
Closed

Enhancement: Also provide a replace method on a node with children #15

Lukas-Stuehrk opened this issue Apr 30, 2020 · 1 comment · Fixed by #26
Labels
enhancement New feature or request

Comments

@Lukas-Stuehrk
Copy link
Member

Currently, there's no dedicated method to replace a node with another node.

One could already express a replacement with a combination of insert and remove, but I think it makes sense to also provide a wrapper around cmark's cmark_node_replace(). The same like we do for all the other operations on nodes.

I can provide a pull request once #11 is merged.

@Lukas-Stuehrk Lukas-Stuehrk changed the title Improvement: Also provide a replace method on a node with children Enhancement: Also provide a replace method on a node with children Apr 30, 2020
@mattt mattt added the enhancement New feature or request label Apr 30, 2020
@mattt
Copy link
Contributor

mattt commented Apr 30, 2020

@Lukas-Stuehrk That sounds great! Given that there's already a cmark function that does this, it should be a straightforward addition (the hardest part may be getting the right argument order 😝).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants