Skip to content

What's required for a extension that handles cross-line content? #178

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

You must be logged in to vote

Hi!

First off, I don‘t understand your replace value, why would anyone want __demo__ to appear in a document?

What you are making looks a bit like the example from the readme. I hope you saw that. When you see that, you might also see that it’s included in further exercises. And, earlier, that it’s mentioned that micromark-extension-mdx-expression is similar but more advanced, already: https://github.com/micromark/micromark-extension-mdx-expression.

Looking at its source code, you will see that line endings are in a separate token: https://github.com/micromark/micromark-extension-mdx-expression/blob/9f7875c314ea0b4603331aa46595af83594f9163/packages/micromark-factory-mdx-expression/dev/ind…

Replies: 1 comment 2 replies

Comment options

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

@07akioni
Comment options

Answer selected by 07akioni
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