Skip to content

Trying to include blockquote-admonitions. #1195

Closed Answered by Saul-Mirone
mggrand asked this question in Q&A
Discussion options

You must be logged in to vote

The plugin seems won't change the AST of blockquote. It just check the first line of blockquote and modify the html output.

If you want to implement something similar in milkdown. You'll need to change the AST of the blockquote (like create a new node). You can see how I implemented the image block here: https://github.com/Milkdown/milkdown/blob/main/packages/components/src/image-block/remark-plugin.ts

In your case, you'll need to check the first paragraph in blockquote's children and create a new node if it matches some pattern.

Replies: 2 comments 5 replies

Comment options

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

Answer selected by mggrand
Comment options

You must be logged in to vote
4 replies
@Saul-Mirone
Comment options

@mggrand
Comment options

@Saul-Mirone
Comment options

@mggrand
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
2 participants