mdast-util-remove-wiki-links and mdast-util-wiki-links #81
-
I have seen https://github.com/landakram/remark-wiki-link and https://github.com/flowershow/remark-wiki-link-plus. I am still understanding their codebases, so apologize if I'm confused in this post. I was thinking there is a way to turn a
I'm imagining a simple mdast util that will do this. As well as one that will remove them, too.
I naively began parsing a mdast paragraph node for its Over the coming weeks I will hope to drive out some solutions along these lines, so any feedback is much appreciated. I'm sure yall are busy, so thank you for taking the time to read. <3 (PS, I love this ecosystem. You are doing a great job :D <3 I'm a very happy user!) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 16 replies
-
Welcome @aegatlin 👋 For
I'd recommend using an existing wikilink parser (like https://github.com/landakram/remark-wiki-link). |
Beta Was this translation helpful? Give feedback.
Welcome @aegatlin 👋
For
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.