Skip to content

mdast-util-remove-wiki-links and mdast-util-wiki-links #81

Answered by ChristianMurphy
aegatlin asked this question in Ideas
Discussion options

You must be logged in to vote

Welcome @aegatlin 👋

For

I'm imagining a simple mdast util that will do this. As well as one that will remove them, too.

In the [[middle]] of the sentence. => In the middle of the sentence.

I'd recommend using an existing wikilink parser (like https://github.com/landakram/remark-wiki-link).
Then creating an AST plugin similar to https://github.com/remarkjs/remark-unwrap-images to unwrap the text inside wiki links.
https://unifiedjs.com/learn/ introduces working with ASTs and creating plugins.

Replies: 1 comment 16 replies

Comment options

You must be logged in to vote
16 replies
@aegatlin
Comment options

@aegatlin
Comment options

@wooorm
Comment options

@aegatlin
Comment options

@wooorm
Comment options

Answer selected by aegatlin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
3 participants