medfreeman / remark-generic-extensions

!Extension[Content](Argument){Properties} -> :tada: — commonmark generic directive extension for remark

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

remark@next (13)

wooorm opened this issue · comments

commented

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 “generic extensions”.
Keep an eye out that plugin, which will also have micromark and mdast extensions too, and feel free to ask me questions!

commented

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-generic-extensions can be done with remark-directive too, where remark-directive handles the syntax and tree, and remark-generic-extensions changes the tree to create HTML?