-
Notifications
You must be signed in to change notification settings - Fork 100
Passing props in code blocks to component #76
Comments
I really want this too. Will look into it to see if it's something we can enable here. My suspicion is that we'll have to PR to mdx itself to support it though. |
Looks like it's going to require this PR to get merged -- remarkjs/remark#345 -- since mdx uses remark-parse, whose AST is mdast (and the mdast description PR was merged). |
Might be able to work around since apparently we could do the infostring splitting ourselves for now -- mdx-js/specification#17 (comment) |
we lose the inforstring in between mdPlugins and hastPlugins in mdx core: https://codesandbox.io/s/3y4wymyj75 I believe it's due to this line in mdast-util-tohast -- https://github.com/syntax-tree/mdast-util-to-hast/blob/master/lib/handlers/code.js#L15 |
We need this: syntax-tree/mdast-util-to-hast#24 and then we should add handling to MDX core to turn the meta string into props |
Just waiting on an MDX core release now. Should be available in any |
The following markdown spec mentions being able to use
props
(?) inside of code blocks: https://github.github.com/gfm/#indented-code-blocks. I am not sure if this would a issue we can fix withingatsby-mdx
.The text was updated successfully, but these errors were encountered: