-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Look at supporting multiple syntax highlighters #438
Comments
cc @brentvatne |
closing this related issue: #388 |
@JoelMarcey @yangshun should we switch to Prism? I looked at highlight.js and couldn't find support for JSX. |
I have investigated this. One thing to note is that unlike highlight.js, prism.js doesn't support auto language detection. Since highlight.js couldn't support JSX, do we want to:
My mockup for now |
What do you mean by auto-language detection? You mean when if the language is not explicitly set? e.g ```js |
Is this a requirement? The highlighter github uses for markdown doesn't do auto-language detection either. |
I think it's not required 😄. Anyway, would you prefer to see option 1 or option 2 ? |
Think for now option 2 might be better. Don't think we have tests to check which languages might break using prismjs outside of |
Any thoughts @yangshun @JoelMarcey ? |
Option 2 might work ok. It's a little odd to have a second highlighter that is only used for one language. Could we do something like... Use |
Something like this @JoelMarcey ? usePrism: ['js', 'jsx'] Giving some examples:
|
@endiliey 👍 Yep, something similar to that. I wonder if option 1 is easier or more clean 😆 But I think this should be ok. Let me look at the PR. |
Is this a bug report?
No
Have you read the Contributing Guidelines?
Yes
Environment
N/A
Steps to Reproduce
https://twitter.com/notbrent/status/961436860928049152
Expected Behavior
JSX is supported
Actual Behavior
JSX is not supported
Reproducible Demo
N/A
The text was updated successfully, but these errors were encountered: