-
Notifications
You must be signed in to change notification settings - Fork 841
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
[WIP] Replace Highlight.js with Prism #4400
Conversation
This PR came up during today's sync, so I pulled it down to see how much work is left. Got it updated with upstream before realizing that I don't have any ideas at the moment, but this casts doubt on being able to use cc// @chandlerprall |
Yep. I wondered if we would just want to use Prism directly. The primary reason I went to I knew it has hightlight.js as a dep, but thought it was an either/or situation. |
Same. I was surprised when I went digging. |
https://github.com/FormidableLabs/prism-react-renderer looks pretty interesting, as an alternative |
@thompsongl That looks like it'd be a pretty seamless switch and still supports the CSS side with a JS theme that we could use with emotion. Lemme see if I can get you a fresh PR similar to this one. Then I can pass it back. Won't close out virtualization, but we can likely add that on our own with react-window in a later step. |
After talking with @chandlerprall yesterday about the highlight.js timeline, I started looking into this again. First some background:
So Do/Did we actually intend to support non-string/non-code Another change is that cc// @cchaos on this also |
To get to the heart of your question. I think it's perfectly acceptable for it to ONLY accept string content. |
I have just about enough work completed to open a new PR. It might be easier to understand the differences and what breaking changes will be introduced. |
Closing this PR; moving discussion to #4638 |
Summary
Replaces our usage of highlight.js with Prism through https://github.com/react-syntax-highlighter/react-syntax-highlighter
Gives us the ability to add virtualization at some point.
Still has the following issues:
EuiMarkdownEditor
EuiCode
Checklist