Conversation
|
Nice approach. In that case, there won't be any issues popping up here for section nodes, main nodes, article nodes... P.S. Line 632/633 in your pr are superfluous |
|
What about something like this? In a plugin we have: basically some way of accessing the compiler and registering a new renderer function. |
|
That's in fact possible :) in an 'attacher' there's access to mdast, which has access to the compiler |
|
I just woke up when I wrote the previous reply. Hope the code in f3b35fe better shows what I meant ;) |
|
this is great -- thank you |
When developing plugins which modify the ast, I wanted the ability to create simple wrapper divs.
I just noticed the new functionality where you can specify a custom element name and I think this is a good improvement overall. What wasn't clear to me was which element I should use as the base, if what I wanted was just a simple div which wrapped whatever children the node has.
Would be happy to clean up and simplify the implementation or hear about better approaches to solving this.