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

highlight.js v10.7+ has deprecated 'highlightBlock', we need to use 'highlightElement' #82

Open
lucascaton opened this issue Jul 27, 2021 · 6 comments

Comments

@lucascaton
Copy link

Hi there 👋

highlight.js v10.7 includes some deprecations and I noticed this in my website's console (browser dev tools):

Deprecated as of 10.7.0. highlightBlock will be removed entirely in v12.0
rollbar.min.js:1 Deprecated as of 10.7.0. Please use highlightElement now.
@oelbaga
Copy link

oelbaga commented Apr 23, 2022

I'm seeing this as well! Wondering will this be updated and what happens to this package when Highlight.js goes to v12

@n2o
Copy link

n2o commented Jun 27, 2022

Still the same problem as in 2021. Please consider choosing the recommended way :-)

@lucascaton
Copy link
Author

@n2o, what's the recommended way?

@n2o
Copy link

n2o commented Jun 28, 2022

The functions regarding hljs.highlightBlock are deprecated. Your error message describes a solution.

Used, e.g., in this line: https://github.com/akiran/react-highlight/blob/master/src/index.js#L21

@lucascaton
Copy link
Author

Ah, I see. I thought you meant for me to choose the recommended way 😅

@n2o
Copy link

n2o commented Jun 28, 2022

#81 uses the new API, but obviously this project is dead... I dropped this lib from my project and switched to https://github.com/react-syntax-highlighter/react-syntax-highlighter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants