How can I add custom "tags" to mdast-util-from-markdown? #135
Unanswered
alvarocastro
asked this question in
Q&A
Replies: 2 comments
|
Welcome @alvarocastro! 👋 You can find an example of this in https://github.com/syntax-tree/mdast-util-math/#readme, which extends markdown with math syntax. |
0 replies
|
You might also be able to add them with https://github.com/syntax-tree/mdast-util-find-and-replace (or https://github.com/syntax-tree/hast-util-find-and-replace, if you care about HTML) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I need to parse markdown, but my markdown has some custom tags (or nodes? I don't know the proper name) which are
[%12345%]for mentions (where the number is the user ID) and#text(for hashtags).I would like to know if
mdast-util-from-markdowncan somehow be extended to add those custom tags and get them as custom defined nodes in the result. The same way**text**ends up being aboldnode.I'm open to use other libraries, I just need to parse markdown (with some custom tags) into some kind of AST to conveniently manipulate it later (format it into some other kind of AST for a WYSIWYG editor (TipTap / ProseMirror))
All reactions