-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Details tag with tables or table syntax not correctly rendered after modifying AST and converting back to Markdown #1
Comments
Hey! I think your previewer is wrong. You use a markdown previewer. It doesn’t render MDX 2+ properly.
Your example looks fine. Both the input and output MDX are perfect. Your screenshots don’t include |
This comment has been minimized.
This comment has been minimized.
This project isn’t about markdown. This is MDX. There is a real difference. Don’t use MDX things if you want markdown.
ASTs don’t work like that. ASTs are not CSTs.
Which one? Your code does not modify.
That is not an issue. That’s how MDX works. You’re asking about XY problems and not providing code. Please explain your actual question. Please provide more info. |
Yes. Use .mdx as an extension though |
Now please clone this repository and run 'npm install'. After that, execute the 'index.js' file. This will generate the 'processes.mdx' file. Open the file with MDX Preview |
@niravbhuva99 put your example in a sandbox. Nobody wants to run an unvetted executable on their machine, it's a security nightmare. |
@niravbhuva99 you are generating a |
You're asking about a previewer. I don't know this previewer. This tools seems broken. If it's broken, ask the folks working on that tool. For us here: why do you care about some random preview tool? What do you actually want to do? MDX, markdown? What is your root problem? |
@ChristianMurphy Do you know which previewer the MDXjs playground uses? |
@niravbhuva99 the MDX website uses MDX to render the preview https://github.com/mdx-js/mdx/blob/8f754f707207915bd34c3af8f9064e367c125a58/docs/_asset/editor.jsx That doesn't answer the question what are you using and trying to do? |
I'm currently working with netlify-cms. My aim is to be able to preview MDX components embedded in my pages directly within Netlify CMS. I am also modifying the link nodes and then converting them back to MDX. It seems that after this modification, some of the MDX content does not render as expected. |
I am using a package called netlify-cms-widget-mdx. |
It is broken because Ask |
Initial checklist
Affected packages and versions
I have tested this issue using the latest version of the relevant packages.
Link to runnable example
runnable example
Steps to reproduce
<details>
tag in Markdown.<details>
tag with the table or table syntax does not render correctly.When modifying the Abstract Syntax Tree (AST) and converting it back to Markdown, the
<details>
tag containing either tables or table syntax is not rendered correctly. This issue arises specifically when converting Markdown to AST, making modifications, and then converting back to Markdown. The<details>
tag fails to render as expected in the presence of table syntax within it.Expected behavior
The
<details>
tag with the table or table syntax should render properly after converting the modified AST back to Markdown.Actual behavior
Behavior with Table Syntax
Behavior with Table Syntax Inside Details Tag
Affected runtime and version
[email protected]
Affected package manager and version
"micromark-extension-mdxjs": "^3.0.0", "mdast-util-mdx": "^3.0.0", "mdast-util-from-markdown": "^2.0.0", "mdast-util-to-markdown": "^2.1.0", "@mdx-js/mdx": "^3.0.1", "@mdx-js/mdxast": "^1.1.1"
Affected OS and version
macOs
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: