Closed MaximeHeckel closed 3 years ago
Did you see the guide in the readme? https://github.com/wooorm/xdm#syntax-highlighting
I guess I skipped the highlighting part figuring out it was simply about "color highlighting" 😄 Thank you and sorry for the noise!
fwiw, if you’d want to package that code up as rehype-mdx-meta
or so, I’ll swap that section with a link (+ link from https://github.com/wooorm/xdm#plugins)
Hi 👋
I started testing out xdm on my MDX based blog and so far I love it. I come from
mdx-js
and I found out thatxdm
does not parse code blockspre
the same way asmdx-js
does.For example I'd often define arbitrary key/values after specifying the language for my codeblock
or even some arbitrary syntax to highlight specific lines
and I was always able to get back those values as props on the React side of things.
(Another example from the mdx-js docs: https://mdxjs.com/guides/live-code passing
live=true
to render an alternative codeblock component)However, I don't seem to be able to get the same behavior with
xdm
. Do you have any tips or workaround for this? Or is this simply not supported?Thank you in advance!