-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Improve migration docs for MDX2 markdown import #19733
Comments
@JReinhold would love to brainstorm about this one. the issue is that MDX2 has gotten a lot more strict about markdown syntax than MDX1, so things that "transcluded" properly don't anymore. We could either:
|
I have a strong preference for option 1., otherwise it feels like we're making our own flavor of MDX2, and that's just an API surface that's really difficult to support down the line. But we can talk this over in more detail. |
I would have no objections if this was mostly a migration docs fix - I had only three offending lines, so not hard to fix. However, it would be very nice if the error message could be improved so it would point to the offending place in the markdown file, manually trying to figure out what is wrong in a file thousands of lines long is a bit of a hassle. |
@shilman shall we change the title of this one to essentially be 1? |
Here's the plan:
|
Zoinks!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.36 containing PR #20796 that references this issue. Upgrade today to the
|
Describe the bug
Importing a markdown file (changelog) that includes some "special syntax" causes the mdx page to not render.
Minimal markdown:
The two issues in there are:
<IconSort/>
is not wrapped in backticks, so mdx2 treats it as a component, but does not find the import<foo@google.com>
Failed to fetch dynamically imported module: http://localhost:9001/src/docs/changelog.stories.mdx?t=1667071749836&import
To Reproduce
No response
System
No response
Additional context
Works without errors with SB6.5 and mdx1
The text was updated successfully, but these errors were encountered: