-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
File Highlight: ie crash #2656
File Highlight: ie crash #2656
Conversation
Thank you for the fix @dreammaster82! Please run |
Thank you for contributing @dreammaster82! |
In general, I don't love modifying the prototypes like this but if MDN is recommending it, this is fine. Related to #1578. |
@mAAdhaTTah Btw, we already used this polyfill here before. But I agree that Prism shouldn't modify these prototypes in all other cases. |
Is it necessary to have the polyfill in two places? If Prism.js hooks it up why does the plug-in need to do the same thing? |
Prism doesn't really do anything for plugins other than to provide hooks. You can mix and match any combination of plugins, so copying the polyfill is the easiest solution, or is there something I'm missing? |
Prism core doesn't. Two separate plugins do. It is a little annoying that we have the same code twice tho. Maybe it should be in core? |
Should core house a polyfill that is only used by 2 plugins? Maybe. Core shouldn't contain any code it doesn't need to run IMO. If we wanted to extract the common logic of plugins, then that logic should be a new plugin (library). We already have examples of this with languages like Markup templating. |
Ah I just saw |
@joshgoebel Yeah, we commit our build assets cuz they power the download page. @RunDevelopment Makes sense, let's leave it then. It's not a ton of code, and we'll just kill it when we drop IE11 support. |
IE bug with matches in File Highlight