Fix the alreadyHighlighted issue
:bug: Bug
Since the v11.9.0 of highlight.js there is no highlighting on my code.
The console show me this message: Element previously highlighted. To highlight again, first unset 'dataset.highlighted'.
I've seen that even though it's a minor update, some breaking changes were introduced (as you can read on the release note).
You can see the commit responsible for the issue here.
The first comment on this commit actually explains how to fix this breaking change. This is what I did on your code.
(please note, that I've not tested this fix).
:hash: Versions:
I'm using "simple-code-editor": "2.0.9" (which use "highlight.js": "11.9.0").
:medal_sports: Bonus
This will also close:
- #38
- #39
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| simple-code-editor | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 13, 2024 4:20pm |
So nice @cyrilf, perfect pull request and documentation... you helped me solve a big problem! Congratulations!!
@justcaliturner, please merge it.
@justcaliturner – please merge this
Poking again to hopefully get this merged; We're going on 6 months now. I'm currently able to get by installing "highlight.js": "^11.8.0",, but that might not last long as dependencies update.