2

I have been trying to figure out the Prettify (<!-- language: lang-or-tag-here -->) languages tags.

Language Codes:
default
lang-none
lang-bash, lang-bsh, lang-csh, lang-sh
lang-c, lang-cc, lang-cpp, lang-cxx, lang-cyc, lang-m
lang-cl, lang-el, lang-lisp, lang-lsp, lang-scm, lang-ss, lang-rkt
lang-clj
lang-coffee
lang-cs
lang-css
lang-fs, lang-ml
lang-go
lang-hs
lang-html
lang-java
lang-js, lang-javascript
lang-json
lang-latex, lang-tex
lang-lua
lang-pascal
lang-php
lang-pl, lang-perl
lang-proto
lang-py, lang-python, lang-cv
lang-r, lang-s
lang-rb, lang-ruby
lang-rc, lang-rs, lang-rust
lang-regex
lang-scala
lang-sql
lang-vb, lang-vbs
lang-vhdl, lang-vhd
lang-xml

I think the list of working tags should be linked with their corresponding language, for enhanced clarity. As an exemple, I have yet to find the tag for MatLab.

Also,

How do I report a bug or request a new language?

If it is indeed a bug in the syntax highlighter itself, check the issues list to see if it has already been reported. If it hasn't, feel free to report it or join the project and submit a fix yourself. If you want to ensure that an issue you raised is fixed quickly, it's best to include the fix in the report. If the fix has already been implemented by Prettify but is still not working here, please raise a feature request on Meta to request that a new version of Prettify be deployed.

Even though the title explicitly mentions or request a new language, there is nothing written about this point. The only mentions are for fixes to bugs. I think it could be a good idea to add this missing answer.

4

I've gone ahead and added descriptions above all the language codes to explicitly mention what all of them do, since some of them are a bit less than obvious (had to look them up myself). Currently there is no Matlab module loaded into the Prettify script that Stack Exchange is running on its sites, but looking at the source code on Google, I see that they do have a lang-matlab.js file listed there. So at this point it's just a matter of getting Stack Exchange to add it.

Stack Exchange itself does not maintain the Prettify source, so any bugs and requests to add more languages should be directed to the Google Code Prettify project. I've added a short blurb to that FAQ to indicate you can use the same issues list for bugs to request new language support too.

  • @Sifu No, it wasn't. It was integrated into Prettify, not necessarily Stack Exchange's version of it. There is no Matlab language in the JS file. The Matlab tag itself is set to use default as its highlighting language. So your method just happens to get it highlighted "close enough." – animuson Jul 25 '14 at 18:00
  • I see.. So it has never been integrated while it has been in Google Prettify for over a year? Is it only because the default highlighting "does the job"? Why has it not been integrated? – Sifu Jul 25 '14 at 18:08
  • The way Prettify works is that it provides a bunch of modules, one for each type of language out there. They're not all directly integrated into the code. You can choose which ones you want to be included. Stack Exchange compiles them all into one JS file to minimize HTTP requests. They only update that file when they have a significant reason to do so. – animuson Jul 25 '14 at 18:11
  • @animuson What constitutes a "significant reason"? We've got 5 requests on meta.SE (including this one), a couple on meta.SO, and the feature request you link to has been there for 4 years with no status update. – beaker Mar 12 '16 at 17:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .