Prism: List of language types

Created on 1 Nov 2013  Â·  10Comments  Â·  Source: PrismJS/prism

Is there a list of supported class="language-xxx" values?

I spent about 15 minutes looking through the site and GitHub issues, but couldn't find this anywhere.

Namely, ran into this issue trying to use "language-html" which is actually "language-markup". Seems like an odd choice given that every other language uses its abbreviation.

docs enhancement

Most helpful comment

I created the viewer of the list of supported languages.

I hope this helps developers who are looking up it.

List_of_supported_languages_by_Prism

→ List of supported languages by Prism

All 10 comments

It's the name of these files: https://github.com/LeaVerou/prism/tree/gh-pages/components

Should probably add a definite list somewhere though.

Yes, good call! There needs to be a list somewhere, or at least mention the IDs in the download page...

I think the class list should be in the "Basic Usage" section because it mentions the "language-xxxx" syntax, but to do anything you need to know the language abbreviations available. It shouldn't require starting to assemble a kit to see which languages are available or how to configure them.

It's totally weird that this plugin has absolutly no list of supported languages and how to use them! This is #1 prio, lots of people will reject this plugin otherwise.

This is done here:
http://prismjs.com/#languages-list

So I think this can be closed?

Yep, that works. Thanks!

For those who are looking for a drop-down (<select><option>) list of supported languages, it can be found here : https://ans.wiki/q/ou-trouver-une-liste-deroulante-des-languages-supportes-par-prism/

I think I will have a prebuild script in my project, read node_modules/prismjs/components and writes it to a file module. Especially with typescript and export const supportedLanguages = [...theLanguages] as const; it's very useful to have such list explicitly. Too bad there is none "at the core".

..created a module for that.. https://www.npmjs.com/package/create-prism-list

I created the viewer of the list of supported languages.

I hope this helps developers who are looking up it.

List_of_supported_languages_by_Prism

→ List of supported languages by Prism

Was this page helpful?
0 / 5 - 0 ratings

Related issues

RunDevelopment picture RunDevelopment  Â·  5Comments

jiantosca picture jiantosca  Â·  4Comments

kopax picture kopax  Â·  8Comments

timgoeller picture timgoeller  Â·  4Comments

donnieflorence picture donnieflorence  Â·  4Comments