Replies: 2 comments
-
Welcome @EhsanKey! 👋 Trying your sample code in the MDX playground it doesn't seem to have the unterminated issue described https://mdxjs.com/playground/ I suspect the issue lies in next-mdx-remote. A path forward could be to report the issue to next-mdx-remote. And/or try another mdx and next integration https://mdxjs.com/docs/getting-started/ |
Beta Was this translation helpful? Give feedback.
-
I see some conflicting information. The error you show points at a line that’s different from the MDX content you provided. I imagine you want something like this: {/* Notice the brackets that make the child an MDX expression instead of a paragraph with text */}
<Code fileName="pages/index.js" lang="tsx">{
`const Page = () => {
return <section>Hello World</section>;
};
export default Page;
`
}</Code> Alternatively maybe you want to use ```tsx fileName="pages/index.js"
const Page = () => {
return <section>Hello World</section>;
};
export default Page;
``` |
Beta Was this translation helpful? Give feedback.
-
I have a .mdx file as follows:
I will compile the process using the following code:
My Code component is as follows:
I receive the following error when compiling MDX:
What is the solution?
I would appreciate it if you could help me resolve this issue.
Beta Was this translation helpful? Give feedback.
All reactions