carbon icon indicating copy to clipboard operation
carbon copied to clipboard

Upgrade highlight.js to latest

Open mfix22 opened this issue 3 years ago • 2 comments

Follow https://highlightjs.org/

mfix22 avatar Dec 12 '21 22:12 mfix22

Hello! I was looking to contribute to this project starting with this task but unfortunately, this task is blocked by upstream issues. I'm leaving a note here, in case anyone else is interested in working on this task.

Carbon uses dynamic imports when loading highlight.js, which works in highlight.js v10: https://github.com/carbon-app/carbon/blob/c76585e8001e67c08100b81a02a2eee51ab32acc/lib/highlight-languages.js#L3-L5

However, this behavior has changed in v11. This is a bug in webpack, and has also been reported in highlight.js. We can probably proceed with this task once webpack allows dynamic imports again.

dcshzj avatar Jan 10 '22 09:01 dcshzj

Thanks for looking into this @dcshzj!

mfix22 avatar Jan 25 '22 03:01 mfix22