1. 5
    Remove Markdown Nodes from a Document with unist-util-remove
    43s

Remove Markdown Nodes from a Document with unist-util-remove

InstructorJohn Otander

Share this video with your friends

Send Tweet

When using remark to manipulate markdown documents, you can use unist-util-remove to remove nodes of a particular type. You can combine it with unist-util-visit to remove nodes based on their parent's context in the AST.

In this example, we remove all images contained within heading nodes.