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
Updating to @mdx-js/react 3.0.1 causes admonition blocks to stop rendering colored box #10041
Comments
I tried reproducing your issue in a minimal repro and I couldn't reproduce the bug. Am I missing something ? |
I tried adjusting your stackblitz (completely aligning all versions), but could also not reproduce the problem there. The difference I see between your and my project is Typescript. You've generated a javascript based docusaurus repro. |
I've checked locally: the docusaurus build output contains the (seemingly unrendered) component in the html page. <admonition type="danger"><p>hello</p></admonition> In the stackblitz the html output looks like: <div class="theme-admonition theme-admonition-danger admonition_xJq3 alert alert--danger">
<div class="admonitionHeading_Gvgb">
<span class="admonitionIcon_Rf37">
<svg viewBox="0 0 12 16">
<path fill-rule="evenodd" d="M5.05.31c.81 2.17.41 3.38-.52 4.31C3.55 5.67 1.98 6.45.9 7.98c-1.45 2.05-1.7 6.53 3.53 7.7-2.2-1.16-2.67-4.52-.3-6.61-.61 2.03.53 3.33 1.94 2.86 1.39-.47 2.3.53 2.27 1.67-.02.78-.31 1.44-1.13 1.81 3.42-.59 4.78-3.42 4.78-5.56 0-2.84-2.53-3.22-1.25-5.61-1.52.13-2.03 1.13-1.89 2.75.09 1.08-1.02 1.8-1.86 1.33-.67-.41-.66-1.19-.06-1.78C8.18 5.31 8.68 2.45 5.05.32L5.03.3l.02.01z"></path>
</svg>
</span>
danger
</div>
<div class="admonitionContent_BuS1">
<p>hello</p>
</div>
</div> At least this seems to explain what causes the warning in the console. |
Due to using an automated version management system (Renovate Mend), version pinning is crucial to my repo. Therefore, this solution is not a viable one for me. I have removed |
@davidzwa You could still use version pinning. All you need to do is to make sure you are using the same version of |
The problem is that Renovate did upgrade it before, but I suppose it did not resolve the lock file properly causing two versions to appear. I'm not sure what to do about that and I feel its not a problem to be discussed here. The truth is: Its annoying that no compilation error is thrown, so a simple Why does the admonition block not throw a compilation error? |
Because MDX doesn't. 🤷♂️ We don't implement Markdown compilation; MDX does. If MDX doesn't tell us something went wrong, there's nothing we can do. |
Have you read the Contributing Guidelines on issues?
Prerequisites
npm run clear
oryarn clear
command.rm -rf node_modules yarn.lock package-lock.json
and re-installing packages.Description
When upgrading
@mdx-js/react
to exactly3.0.1
, all the admonitions in my docs stop showing blocks.Version 3.0.1
Version 3.0.0
Reproducible demo
https://github.com/fdm-monster/fdm-monster-docs/blob/main/docs/0_installing/windows_service.md
Steps to reproduce
Expected behavior
To see the 3.0.1 package not break admonitions. The blocks should be formatted.
Actual behavior
The admonition blocks do not show properly, irregardless of whether Im creating a .md file or .mdx file.
Your environment
Self-service
The text was updated successfully, but these errors were encountered: