-
-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
receive custom attributes. #71
Comments
What do you want exactly? Why do you return If you want to implement expandable pre element, you can wrap the "pre" element in a "div" having expandable feature. |
I am using <MDXRemote
components={{
pre: function Pre({ children, className, ...props }: React.ComponentProps<'pre'>) {
console.log(props.expanded)
return <pre>{children}</pre>
}
}}
options={{
rehypePlugins: [rehypeKatex, rehypePrismPlus, rehypeSlug],
remarkPlugins: [remarkGfm, remarkMath, remarkDirective, remarkDirectiveRehype]
}}
source="# h1"
/> |
Hi @Flysky12138 I don't see it as a feature that should be included as part of a highlighting plugin. You could consider including your own remark plugin to transform or store desired attributes. |
i wanna get
expanded
The text was updated successfully, but these errors were encountered: