Closed enzocomics closed 3 months ago
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?
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?
I think that would be the expected behavior. As a reference this is how obsidian deals with these cases:
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:
defaultLanguage
, or to nonePlease test this and let me know if you encounter any issues.
:tada: This issue has been resolved in version 2.20.7 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
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!