File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 1- import { MDXRemote as BaseMDXRemote } from 'next-mdx-remote-client/rsc' ;
1+ import { MDXRemote as BaseMDXRemote , MDXComponents } from 'next-mdx-remote-client/rsc' ;
22import { SerializeOptions } from 'next-mdx-remote-client/serialize' ;
33import rehypeKatex from 'rehype-katex' ;
44import remarkGfm from 'remark-gfm' ;
@@ -11,17 +11,20 @@ export async function MDXRemote({
1111 source,
1212 mdxOptions,
1313 scope,
14+ components,
1415 parseFrontmatter,
1516} : {
1617 source : string ;
1718 mdxOptions ?: SerializeOptions [ 'mdxOptions' ] ;
1819 scope ?: SerializeOptions [ 'scope' ] ;
20+ components ?: MDXComponents ;
1921 parseFrontmatter ?: SerializeOptions [ 'parseFrontmatter' ] ;
2022} ) {
2123 return (
2224 // @ts -expect-error Server Component
2325 < BaseMDXRemote
2426 source = { source }
27+ components = { components }
2528 options = { {
2629 scope,
2730 mdxOptions : {
@@ -33,12 +36,7 @@ export async function MDXRemote({
3336 ] ,
3437 rehypePlugins : [
3538 rehypeKatex ,
36- [
37- rehypeSyntaxHighlighting ,
38- {
39- ignoreMissing : true ,
40- } ,
41- ] ,
39+ [ rehypeSyntaxHighlighting , { ignoreMissing : true } ] ,
4240 ...( mdxOptions ?. rehypePlugins || [ ] ) ,
4341 ] ,
4442 format : mdxOptions ?. format || 'mdx' ,
You can’t perform that action at this time.
0 commit comments