GitHub MD Syntax Highlighting Language Support ::

May 30, 2012 at 6:21 pm EST

GitHub’s MarkDown (.md) support includes syntax highlighting for a large number of languages. Internally, GitHub uses Pygments, and as such, one can look at the list of available lexers to figure out what languages are supported. For convenience and to procrastinate however, I have compiled the list of supported languages in the table below. Feel free to leave a comment if I made a mistake anywhere or missed anything!

Note that this is not a full, comprehensive list. Still working on figuring that one out!

Language ```lang alias
Agile languages
Factor factor
Fancy fancy, fy
Io io
Lua lua
MiniD minid
MoonScript moon, moonscript
Perl perl, pl
Python 3 python3, py3
Python 3 tracebacks py3tb
Python 3 console pycon
Python 2 python, py
Python 2 tracebacks pytb
Ruby console rbcon, irb
Ruby rb, ruby, duby
Tcl tcl
Assembly languages
Output of ‘objdump -Sr’ on compiled C files c-objdump
Output of ‘objdump -Sr’ on compiled C++ files cpp-objdump, c++-objdump, cxx-objdump
Output of ‘objdump -Sr’ on compiled D files d-objdump
Gas (AT&T) assembly code gas
LLVM assembly code llvm
Nasm (Intel) assembly code nasm
Output of ‘objdump -dr’ objdump
Compiled languages
Ada ada, ada95, ada2005
BlitzMax blitzmax, bmax
C c
C++ cpp, c++
Pyrex, Cython cython, pyx
D d
Delphi, Turbo Pascal, Free Pascal delphi, pas, pascal, objectpascal
Dylan dylan
eC ec
Fantom fan
Felix felix, flx
FORTRAN 90 fortran
GLSL gl
Go go
Modula-2 modula2, m2
Nimrod nimrod, nim
Objective-C objective-c, objectivec, obj-c, objc
Ooc ooc
Prolog prolog
Vala vala, vapi
.NET languages
Boo boo
C# within ASP.NET aspx-cs
C# csharp, c#
F# fsharp
Nemerle nemerle
Visual Basic within ASP.NET aspx-vb
Visual Basic.NET vb.net, vbnet
Functional languages
Common Lisp common-lisp, cl
Coq coq
Elixir console iex
Elixir elixir, ex, exs
Erlang erlang
Erlang shell erl
Haskell haskell, hs
Literate Haskell lhs, literate-haskell
newLISP newlisp
OCaml ocaml
Opa opa
Standard ML language sml
Scheme scheme, scm
Hardware descriptor languages
SystemVerilog from IEEE 1800-2009 sv
Verilog with preprocessor directives v
VHDL vhdl
JVM languages
Clojure clojure, clj
Gosu gosu
Gosu templates gst
Groovy groovy
Ioke ioke, ik
Java java
Kotlin kotlin
Scala scala
Math languages
Matlab matlab
Matlab sessions matlabsession
MuPAD mupad
Numpy (Numerical Python) numpy
GNU Octave octave
R console rconsole, rout
S, S-plus, R splus, s, r
Scilab scilab
Other languages
ABAP abap
AppleScript applescript
Asymptote asy, asymptote
Autohotkey ahk
Awk awk, gawk, mawk, nawk
Befunge befunge
BrainFuck brainfuck, bf
Bro bro
CFEngine3 cfengine3, cf3
ECL ecl
Gherkin Cucumber, cucumber, Gherkin, gherkin
Gnuplot gnuplot
GoodData-CL gooddata-cl
Hybris hybris, hy
Logtalk logtalk
MOOCode moocode
GoodData MAQL maql
Modelica modelica
Newspeak newspeak
OpenEdge ABL, Progress openedge, abl, progress
PostScript postscript
Povray pov
Protocol Buffer definition files protobuf
REBOL rebol
Redcode redcode
Smalltalk smalltalk, squeak
SNOBOL4 snobol
UrbiScript urbiscript
Parser generators
ANTLR with ActionScript target antlr-as, antlr-actionscript
ANTLR with C# target antlr-csharp, antlr-c#
ANTLR with C++ target antlr-cpp
ANTLR with Java target antlr-java
ANTLR antlr
ANTLR with Objective-C target antlr-objc
ANTLR with Perl target antlr-perl
ANTLR with Python target antlr-python
ANTLR with Ruby target antlr-ruby, antlr-rb
Ragel in a C host file ragel-c
Ragel in a C++ host file ragel-cpp
Ragel in a D host file ragel-d
Ragel embedded in a host file ragel-em
Ragel in a Java host file ragel-java
Ragel in a C host file ragel-c
Ragel ragel
Ragel in an Objective C host file ragel-objc
Ragel in a Ruby host file ragel-ruby, ragel-rb
Ragel in a C host file ragel-c
Shell languages
(ba|k|)sh bash, sh, ksh
Bash session console
DOS/Windows Batch bat
PowerShell powershell, posh, ps1
Tcsh tcsh, csh
Special
Token stream formatted with the RawTokenFormatter raw
Plain text text
SQL dialects
MySQL mysql
Pl/pgSQL plpgsql
Postgres session psql, postgresql-console, postgres-console
PostgreSQL postgresql, postgres
ANSI SQL sql
SQLite3 sessions sqlite3
Template engines’ markup
Cheetah with HTML html+cheetah, html+spitfire
Cheetah with Javascript js+cheetah, javascript+cheetah, js+spitfire, javascript+spitfire
Cheetah cheetah, spitfire
Cheetah with XML xml+cheetah, xml+spitfire
Coldfusion in HTML cfm
Coldfusion statements cfs
Django with CSS css+django, css+jinja
ERB with CSS css+erb, css+ruby
Genshi with CSS css+genshitext, css+genshi
PHP with CSS css+php
Smarty with CSS css+smarty
Django, Jinja django, jinja
ERB erb
Evoque with HTML html+evoque
Evoque evoque
XML with Evoque xml+evoque
Genshi and Kid XML templates genshi, kid, xml+genshi, xml+kid
Genshi text templates genshitext
Django with HTML html+django, html+jinja
Genshi and Kid HTML templates html+genshi, html+kid
PHP with HTML html+php
Smarty with HTML html+smarty
Django with Javascript js+django, javascript+django, js+jinja, javascript+jinja
ERB with Javascript js+erb, javascript+erb, js+ruby, javascript+ruby
Genshi text templates with Javascript js+genshitext, js+genshi, javascript+genshitext, javascript+genshi
PHP with Javascript js+php, javascript+php
Smarty with Javascript js+smarty, javascript+smarty
JSP (Java Server Pages) jsp
Mako with CSS css+mako
Mako with HTML html+mako
Mako with Javascript js+mako, javascript+mako
Mako mako
Mako with XML xml+mako
Mason mason
Myghty with CSS css+myghty
Myghty with HTML html+myghty
Mighty with Javascript js+myghty, javascript+myghty
Myghty myghty
Myghty with XML xml+myghty
ERB with HTML (rhtml) rhtml, html+erb, html+ruby
Smarty smarty
SSP (Scalate Server Pages) ssp
Tea Templates tea
Velocity with HTML html+velocity
Velocity velocity
Velocity with XML xml+velocity
Django with XML xml+django, xml+jinja
ERB with XML xml+erb, xml+ruby
PHP with XML xml+php
Smarty with XML xml+smarty
Non-source code
Apache config file format apacheconf, aconf, apache
BBCode bbcode
Makefiles basemake
CMake files cmake
Darcs patch dpatch
Debian control files control
diffs diff, udiff
Gettext catalog files pot, po
Groff groff, nroff, man
HTTP sessions http
IRC logs irc
Lighttpd lighty, lighttpd
BSD and GNU make make, makefile, mf, bsdmake
MoinMoin, Trac Wiki trac-wiki, moin
Nginx config files nginx
Java properties files properties
PyPy log pypylog, pypy
reStructuredText rst, rest, restructuredtext
Debian sources.list sourceslist, sources.list
Squid squidconf, squid.conf, squid
LaTeX, TeX tex, latex
VimL vim
YAML yaml
Web-related languages and markup
ActionScript 3 as3, actionscript3
ActionScript as, actionscript
CoffeeScript coffee-script, coffeescript
CSS css
Dart dart
DTD dtd
Duel Views Engine (JBST) duel, Duel Engine, Duel View, JBST, jbst, JsonML+BST
Haml haml, HAML
haXe hx, haXe
HTML html
JSON data structures json
Jade jade, JADE
Javascript js, javascript
MXML mxml
Objective-J objective-j, objectivej, obj-j, objj
PHP php, php3, php4, php5
Sass sass, SASS
Scaml scaml, SCAML
SCSS scss
XQuery xquery, xqy
XML xml
XSLT xslt

No Comments