-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add mdx language #3096
Add mdx language #3096
Conversation
This includes syntax highlighting for JSX. It may be useful to backport these to This also includes some more advanced markdown features currently not available in the |
The MDX support is based on microsoft/monaco-editor#3096, which hasn’t been merged yet.
They represent JSX elements.
This is nice for writing content.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR! I left a comment. Especially for third party contributions, tests are crucial!
The sample is taken from https://github.com/wooorm/markdown-tm-language.
Sorry it took so long, but I added some tests! |
Hello, is there any update? |
This is an initial attempt to add MDX language support to Monaco editor. MDX is a language which extends markdown by allowing the use of JSX and ecmascript imports and exports.
I am having some issues implementing this though. Some help would be greatly appreciated.
I’ve been using the following code for testing:
The JSX component highlighting is broken due to the props. If they are removed, highlighting is fixed.FixedIs is possible to highlight the JavaScript expression inside the bold markdown text?Yep, doneIf I add the following JavaScript expressionNo longer throws, but the closing bracket does exit the{1 + {}}
, an error is thrown:Error: mdx: cannot pop embedded language if not inside one
javascript
embedded language.I think it’s very much usable in the current state.