-
-
Notifications
You must be signed in to change notification settings - Fork 161
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
[BUG] Breaking error when the specified code block language is misspelled/doesn't exist #423
Comments
You raise a fair point here. I think I can just make it use the default or plain text if the language is unrecognized. What do you think? |
Yes, I totally agree. I encountered many issues using this, so I added literally every language 😂 Just the syntax color is perfect. |
Yes, I agree as well. It should definitely revert to the default language (or plain text, if the language is unspecified). Thanks for looking into it! |
Everyone, just published 3.0.0-alpha.1. It replaces the previously used sandpack wrapper with vanilla a codemirror editor. This is a breaking change, because the codemirror plugin will no longer accept a sandpack theme. The release does a few other things:
Please test this and let me know if you encounter any issues. |
🎉 This issue has been resolved in version 2.20.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Confirming that the update resolved my issue. Thank you so much @petyosi for your awesome work! |
Describe the bug
When typing a code block in the editor, if the user misspells the language, or references a language that doesn't exist, an application error occurs, necessitating a complete page refresh:
Console yields this error:
Error: No CodeBlockEditor registered for language=html meta=
Reproduction
I discovered it on my dev site, but the issue is reproducible on the demo site https://mdxeditor.dev/editor/demo
To Reproduce
Steps to reproduce the behavior:
```html
, followed by spacebarExpected behavior
codeBlockLanguages
shouldn't throw an app-breaking errorDesktop (please complete the following information):
Additional context
Thank you for your help!
The text was updated successfully, but these errors were encountered: