Use PrismJS autoloader to efficiently support all languages

The bundled PrismJS only comes with support for certain pre-selected languages. There's a good chance that certain programming-oriented forums will be missing their language.

Instead of wrangling addons that aim to extend PrismJS, PrismJS provides an autoloader plugin that can automatically load languages from either bundled (but separate) files or a CDN. This should cut down on JS size (at the expense of more HTTP requests in certain cases, which isn't a problem with HTTP/2) and extend support to all languages supported by PrismJS.

This will also serve to remove confusion around the syntax highlighting configuration in ACP, where administrators don't know which languages would work - as there is no list to choose from.

See:
Prior art:
 
Upvote 0
Back
Top Bottom