Skip to content
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

Core: Removed env.elements for 'before-highlightall' #1968

Merged
merged 1 commit into from
Jul 11, 2019

Conversation

RunDevelopment
Copy link
Member

This removes the env.elements property from the environment of the before-highlightall hook.

Why?

  • There is no plugin that is using it.
  • It is inherently incompatible with env.selector. Even if a plugin using elements wanted to respect selector it would not be able to because 1) there might be plugins after it (in before-highlightall) extending the selector and 2) the plugin has no access to the current container.

Isn't this a breaking change?
Yes, but I don't think that this will have any impact for the above reasons and because from a user perspective, it's hard to use than just iteration over your elements and calling Prism.highlightElement yourself.

Copy link
Member

@mAAdhaTTah mAAdhaTTah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm ok with this. I doubt anyone is using this for real.

@mAAdhaTTah mAAdhaTTah merged commit 9d9e2ca into PrismJS:master Jul 11, 2019
@RunDevelopment RunDevelopment deleted the remove_env_elements branch July 11, 2019 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants