Closed JTinkers closed 3 years ago
Hey! I just merged a PR that updates highlight.js, I published markdown-it-highlightjs@3.3.0 with that
How would you go to prevent importing all languages by default? Does highlight.js support anything like this?
Yes, it allows you to either autoload all or selected ones.
https://highlightjs.readthedocs.io/en/latest/api.html#configure-options - the languages
field in configure(options)
Oh makes sense
Since those are global highlight.js options, you should be able to do require('highlight.js').configure({ languages: [...] })
before calling markdown-it-highlightjs! Let me know if that works :)
Yeah, I've just forked and modified your package few months ago.
Right now it uses an outdated version and imports all languages by default. This makes whole plugin pack a whopping 1.04 MB.
https://i.imgur.com/9AGcONT.png