Skip to content

Where is the props of Pre component? #2306

Answered by ChristianMurphy
jlenon7 asked this question in Q&A
Discussion options

You must be logged in to vote

Welcome @jlenon7! 👋

Understanding mdx's architecture will help clarify this: https://mdxjs.com/packages/mdx/#architecture
Your first screenshot shows markdown code meta properties, there is no equivalent in HTML (according to commonmark) so it is dropped when converting markdown (mdast) to HTML (hast).
If you'd like to preserve the information, you'll want to add a markdown (remark/mdast) plugin defining how you want the metadata to be preserved.

There are some existing plugins which may already have the behavior you want:

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
5 replies
@jlenon7
Comment options

@ChristianMurphy
Comment options

@jlenon7
Comment options

@jlenon7
Comment options

@ChristianMurphy
Comment options

Answer selected by jlenon7
Comment options

You must be logged in to vote
3 replies
@wooorm
Comment options

@muditjuneja
Comment options

@remcohaszing
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants