Open wooorm opened 4 years ago
I have created a micromark extension for my interpretation of the generic directive syntax: https://github.com/micromark/micromark-extension-directive And a corresponding utility for mdast: https://github.com/syntax-tree/mdast-util-directive And wrapped ’em all up in: https://github.com/remarkjs/remark-directive
I hope those serve as inspiration: note that you don’t have to split them up in several repos, but that’s how I like to work.
Finally, something like remark-container
can be done with remark-directive
too, where remark-directive
handles the syntax and tree, and remark-container
changes the tree to create HTML?
Hi!
remark is switching to a new parser (and compiler) internally (micromark,
remarkjs/remark#536
), which will break this plugin. I will create a generic directives plugin though, time permitting, in this month, which would be a good inspiration for containers. Keep an eye out for that plugin, which will be small wrapper code around micromark and mdast extensions, and feel free to ask me questions!