Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A List of Google Prettify Language Codes

I cannot find this anywhere and I swear I used to be able to very simply without much prying. Can anyone help me? Thanks. I would appreciate it. Also, does prettify support Batch?

like image 202
Gabriel Ryan Nahmias Avatar asked Sep 25 '13 04:09

Gabriel Ryan Nahmias


People also ask

What is Google code prettify?

A Javascript module and CSS file that allows syntax highlighting of source code snippets in an html page.


1 Answers

I thought it would be helpful to have an actual list rather than just a link. I found it in the loader directory that @MikeSamuel linked to from Javascript code prettifier. As the readme states, the prettify.js comments are the authoritative source. However, What is syntax highlighting and how does it work? provided a better formatted list, so I will copy that below. Refer to the the links for the most up-to-date information.

If you are using the Prettify codes to markup Stack Overflow code, you use

<!-- language: lang-or-tag-here -->      your code 

Language Codes:

Let Prettify interpret the code and guess.

default 

Explicitly do not use any syntax highlighting.

lang-none 

Bash and other Shell scripting

lang-bash, lang-bsh, lang-csh, lang-sh 

C, C++, et al

lang-c, lang-cc, lang-cpp, lang-cxx, lang-cyc, lang-m 

C#

lang-cs 

Clojure

lang-clj 

CoffeeScript

lang-coffee 

CSS

lang-css 

Dart

lang-dart 

Delphi

lang-pascal 

Erlang

lang-erl, lang-erlang 

Go

lang-go 

Haskell

lang-hs 

HTML

lang-html 

Java

lang-java 

JavaScript

lang-js, lang-javascript 

JSON

lang-json 

LaTeX and TeX

lang-latex, lang-tex 

Lisp and Scheme

lang-cl, lang-el, lang-lisp, lang-lsp, lang-scm, lang-ss, lang-rkt 

Lua

lang-lua 

OCaml, SML, F#, et al

lang-fs, lang-ml 

Pascal

lang-pascal 

Perl

lang-pl, lang-perl 

PHP

lang-php 

Protocol buffers

lang-proto 

Python

lang-py, lang-python, lang-cv 

R and S

lang-r, lang-s 

Regex

lang-regex 

Ruby

lang-rb, lang-ruby 

Rust

lang-rc, lang-rs, lang-rust 

Scala

lang-scala 

SQL

lang-sql 

VHDL

lang-vhdl, lang-vhd 

Visual Basic

lang-vb, lang-vbs 

XML

lang-xml 
like image 137
Suragch Avatar answered Sep 30 '22 11:09

Suragch