Open jcayzac opened 3 years ago
@jcayzac this is a cool idea! Did you end up getting it to work?
Since there seems to be no way (currently) to add custom pre
or code
elements, I've been unable to get this to actually pass the props anywhere useful
@jcayzac this is a cool idea! Did you end up getting it to work?
I literally posted my working code in the body of the issue.
remark
supports the following notation:In the MDAST
Code
node,js
becomeslang
andfoo bar baz
becomesmeta
.Since MDSveX allows to swap in our own components from a layout file, it would be nice to parse the
meta
string as props and pass them to the component. This can be done with the following plugin forremark
: