Skip to content

Conversation

@RunDevelopment
Copy link
Member

This adds a new hook as described in #2665.

I named the new hook before-set-language instead of highlight-start for 2 reasons:

  1. There are hooks in highlightAllUnder that run before this hook.
  2. We may add hooks in highlightElement before this one in the future.

I also extracted the code that sets the language-xxxx class of an element into its own function.


This resolves #2665.

@github-actions
Copy link

JS File Size Changes (gzipped)

A total of 1 files have changed, with a combined diff of +12 B (+0.4%).

Details
file master pull size diff % diff
components/prism-core.min.js 3.03 KB 3.04 KB +12 B +0.4%

Generated by 🚫 dangerJS against 1875fcf

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.

Hook request: "highlight-start"

1 participant