Closed alesanchezr closed 5 years ago
Please refer to the comment in the issue - https://github.com/mapbox/remark-react/issues/23#issuecomment-232691433
You need to pass {sanitize: {attributes: {'*': ['className']}}}
to get it working in the remark().use()
function.
Hope that helps :)
Thank you @nrhirani !
Let's suppose that the original markdown was a code-block with ```js as opening syntax.
The remarkReactComponents property is not passing the language to the "code" component that y specified, the only property that the component received is an array of children.
My component
PrismCode
is only receiving the children prop, how can I know that language was this code block defined on?