simple-code-editor icon indicating copy to clipboard operation
simple-code-editor copied to clipboard

Fix the alreadyHighlighted issue

Open cyrilf opened this issue 2 years ago • 9 comments

: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

cyrilf avatar Jan 13 '24 16:01 cyrilf

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

vercel[bot] avatar Jan 13 '24 16:01 vercel[bot]

So nice @cyrilf, perfect pull request and documentation... you helped me solve a big problem! Congratulations!!

MiguelAleixo avatar Feb 02 '24 13:02 MiguelAleixo

@justcaliturner, please merge it.

arnonrdp avatar Feb 04 '24 12:02 arnonrdp

@justcaliturner – please merge this

griffin-ezbot avatar Mar 04 '24 00:03 griffin-ezbot

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.

pkkid avatar Jul 19 '24 19:07 pkkid