Skip to content

What exactly is a "frozen" processor / what is the purpose of freezing a processor? #222

Answered by wooorm
ben519 asked this question in Q&A
Discussion options

You must be logged in to vote
const myNewProcessor = rehype().use(rehypeFormat)

This clones (()), then configures (.use(...))

const myNewProcessor = rehype.use(rehypeFormat)

This tries to configure something that is shared with everyone. If you would be able to configure it, everyone else would also be configured.

The reason is that how you use rehype in one place, should not affect how other people, other places, use it!

Traversing trees happens somewhere else. This is unrelated to that!

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ben519
Comment options

@wooorm
Comment options

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