Skip to content
Discussion options

You must be logged in to vote

micromark is indeed lower level. But you want some higher level things: the remark/rehype level is where all the extensions are!

For your first Q, which is allowing/disallowing some HTML, you can:
a) move up a level, https://github.com/syntax-tree/mdast-util-from-markdown, https://github.com/syntax-tree/mdast-util-to-hast, https://github.com/syntax-tree/hast-util-raw, https://github.com/syntax-tree/hast-util-sanitize
b) move up to plugins, use unified + remark + rehype, specifically https://github.com/rehypejs/rehype-sanitize
c) use a single tool that does all that: micromark + some HTML sanitizer of your choosing

For the second Q, what you call “autolink”: that behavior is not “standard”…

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
9 replies
@hoboy0313
Comment options

@JounQin
Comment options

JounQin Feb 28, 2025
Collaborator

@hoboy0313
Comment options

@wooorm
Comment options

Answer selected by hoboy0313
@hoboy0313
Comment options

@hoboy0313
Comment options

@JounQin
Comment options

JounQin Mar 4, 2025
Collaborator

@hoboy0313
Comment options

Comment options

You must be logged in to vote
1 reply
@wooorm
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants