\
Pygments是一个实现的格式化高亮代码的Python库,包含四个模块: lexer
,filters
,formatter
,style
http://pygments.org/
Diff (Lexer)
Short names: diff
Filename extensions: *.diff, *.patch
Mimetypes: text/x-diff, text/x-patch
Delphi (Lexer) >Short names: delphi, pas, pascal, objectpascal
Filename extensions: *.pas
Mimetypes: text/x-pascal
JavaScript+Mako (Lexer)
Short names: js+mako, javascript+mako
Filename extensions:
Mimetypes: application/x-javascript+mako, text/x-javascript+mako, text/javascript+mako
Myghty (Lexer)
Short names: myghty
Filename extensions: *.myt, autodelegate
Mimetypes: application/x-myghty
HTML+Genshi (Lexer)
Short names: html+genshi, html+kid
Filename extensions:
Mimetypes: text/html+genshi
Raw token data (Lexer)
Short names: raw
Filename extensions: *.raw
Mimetypes: application/x-pygments-tokens
DylanLexer (Lexer)
Short names: dylan
Filename extensions: *.dylan
Mimetypes: text/x-dylan
Brainfuck (Lexer)
Short names: brainfuck, bf
Filename extensions: *.bf, *.b
Mimetypes: application/x-brainfuck
MoinMoin/Trac Wiki markup (Lexer)
Short names: trac-wiki, moin
Filename extensions:
Mimetypes: text/x-trac-wiki
reStructuredText (Lexer)
Short names: rst, rest, restructuredtext
Filename extensions: *.rst, *.rest
Mimetypes: text/x-rst
C (Lexer)
Short names: c
Filename extensions: *.c, *.h
Mimetypes: text/x-chdr, text/x-csrc
HTML (Lexer)
Short names: html
Filename extensions: *.html, *.htm, *.xhtml
Mimetypes: text/html, application/xhtml+xml
INI (Lexer)
Short names: ini, cfg
Filename extensions: *.ini, *.cfg
Mimetypes: text/x-ini
Genshi (Lexer)
Short names: genshi, kid, xml+genshi, xml+kid
Filename extensions: *.kid
Mimetypes: application/x-genshi, application/x-kid
CSS+Mako (Lexer)
Short names: css+mako
Filename extensions:
Mimetypes: text/css+mako
Bash (Lexer)
Short names: bash, sh
Filename extensions: *.sh
Mimetypes: application/x-sh, application/x-shellscript
Mako (Lexer)
Short names: mako
Filename extensions: *.mao
Mimetypes: application/x-mako
HTML+PHP (Lexer)
Short names: html+php
Filename extensions: *.phtml
Mimetypes: application/x-php, application/x-httpd-php, application/x-httpd-php3, application/x-httpd-php4, application/x-httpd-php5
HTML+Django/Jinja (Lexer)
Short names: html+django, html+jinja
Filename extensions:
Mimetypes: text/html+django, text/html+jinja
CSS+PHP (Lexer)
Short names: css+php
Filename extensions:
Mimetypes: text/css+php
Lua (Lexer)
Short names: lua
Filename extensions: *.lua
Mimetypes: text/x-lua, application/x-lua
VimL (Lexer)
Short names: vim
Filename extensions: *.vim, .vimrc
Mimetypes: text/x-vim
CSS+Genshi Text (Lexer)
Short names: css+genshitext, css+genshi
Filename extensions:
Mimetypes: text/css+genshi
OCaml (Lexer)
Short names: ocaml
Filename extensions: *.ml, *.mli
Mimetypes: text/x-ocaml
CSS+Myghty (Lexer)
Short names: css+myghty
Filename extensions:
Mimetypes: text/css+myghty
C# (Lexer)
Short names: csharp, c#
Filename extensions: *.cs
Mimetypes: text/x-csharp
IRC logs (Lexer)
Short names: irc
Filename extensions:
Mimetypes: text/x-irclog
Text only (Lexer)
Short names: text
Filename extensions: *.txt
Mimetypes: text/plain
Smarty (Lexer)
Short names: smarty
Filename extensions: *.tpl
Mimetypes: application/x-smarty
Haskell (Lexer)
Short names: haskell
Filename extensions: *.hs
Mimetypes:
Python (Lexer)
Short names: python, py
Filename extensions: *.py, *.pyw
Mimetypes: text/x-python, application/x-python
CSS+Django/Jinja (Lexer)
Short names: css+django, css+jinja
Filename extensions:
Mimetypes: text/css+django, text/css+jinja
CSS+Smarty (Lexer)
Short names: css+smarty
Filename extensions:
Mimetypes: text/css+smarty
Redcode (Lexer)
Short names: redcode
Filename extensions: *.cw
Mimetypes:
JavaScript+Myghty (Lexer)
Short names: js+myghty, javascript+myghty
Filename extensions:
Mimetypes: application/x-javascript+myghty, text/x-javascript+myghty, text/javascript+mygthy
Ruby irb session (Lexer)
Short names: rbcon, irb
Filename extensions:
Mimetypes: text/x-ruby-shellsession
Ruby (Lexer)
Short names: rb, ruby
Filename extensions: *.rb, *.rbw, Rakefile, *.rake, *.gemspec, *.rbx
Mimetypes: text/x-ruby, application/x-ruby
JavaScript+Ruby (Lexer)
Short names: js+erb, javascript+erb, js+ruby, javascript+ruby
Filename extensions:
Mimetypes: application/x-javascript+ruby, text/x-javascript+ruby, text/javascript+ruby
Makefile (Lexer)
Short names: make, makefile, mf
Filename extensions: *.mak, Makefile, makefile
Mimetypes: text/x-makefile
RHTML (Lexer)
Short names: rhtml, html+erb, html+ruby
Filename extensions: *.rhtml
Mimetypes: text/html+ruby
Django/Jinja (Lexer)
Short names: django, jinja
Filename extensions:
Mimetypes: application/x-django-templating, application/x-jinja
ApacheConf (Lexer)
Short names: apacheconf, aconf, apache
Filename extensions: .htaccess, apache.conf, apache2.conf
Mimetypes: text/x-apacheconf
eX (Lexer)
Short names: tex, latex
Filename extensions: *.tex, *.aux, *.toc
Mimetypes: text/x-tex, text/x-latex
Genshi Text (Lexer)
Short names: genshitext
Filename extensions:
Mimetypes: application/x-genshi-text, text/x-genshi
Java (Lexer)
Short names: java
Filename extensions: *.java
Mimetypes: text/x-java
JavaScript+Genshi Text (Lexer)
Short names: js+genshitext, js+genshi, javascript+genshitext, javascript+genshi
Filename extensions:
Mimetypes: application/x-javascript+genshi, text/x-javascript+genshi, text/javascript+genshi
Boo (Lexer)
Short names: boo
Filename extensions: *.boo
Mimetypes: text/x-boo
XML+Ruby (Lexer)
Short names: xml+erb, xml+ruby
Filename extensions:
Mimetypes: application/xml+ruby
Batchfile (Lexer)
Short names: bat
Filename extensions: *.bat, *.cmd
Mimetypes: application/x-dos-batch
Python console session (Lexer)
Short names: pycon
Filename extensions:
Mimetypes: text/x-python-doctest
HTML+Smarty (Lexer)
Short names: html+smarty
Filename extensions:
Mimetypes: text/html+smarty
Objective-C (Lexer)
Short names: objective-c, objectivec, obj-c, objc
Filename extensions: *.m
Mimetypes: text/x-objective-c
JavaScript (Lexer)
Short names: js, javascript
Filename extensions: *.js
Mimetypes: application/x-javascript, text/x-javascript, text/javascript
D (Lexer)
Short names: d
Filename extensions: *.d, *.di
Mimetypes: text/x-dsrc
JavaScript+Django/Jinja (Lexer)
Short names: js+django, javascript+django, js+jinja, javascript+jinja
Filename extensions:
Mimetypes: application/x-javascript+django, application/x-javascript+jinja, text/x-javascript+django, text/x-javascript+jinja, text/javascript+django, text/javascript+jinja
Python Traceback (Lexer)
Short names: pytb
Filename extensions: *.pytb
Mimetypes: text/x-python-traceback
VB.net (Lexer)
Short names: vb.net, vbnet
Filename extensions: *.vb, *.bas
Mimetypes: text/x-vbnet, text/x-vba
BBCode (Lexer)
Short names: bbcode
Filename extensions:
Mimetypes: text/x-bbcode
HTML+Myghty (Lexer)
Short names: html+myghty
Filename extensions:
Mimetypes: text/html+myghty
PHP (Lexer)
Short names: php, php3, php4, php5
Filename extensions: *.php, *.php[345]
Mimetypes: text/x-php
MiniD (Lexer)
Short names: minid
Filename extensions: *.md
Mimetypes: text/x-minidsrc
XML+Smarty (Lexer)
Short names: xml+smarty
Filename extensions:
Mimetypes: application/xml+smarty
CSS (Lexer)
Short names: css
Filename extensions: *.css
Mimetypes: text/css
Scheme (Lexer)
Short names: scheme
Filename extensions: *.scm
Mimetypes: text/x-scheme, application/x-scheme
MuPAD (Lexer)
Short names: mupad
Filename extensions: *.mu
Mimetypes:
JavaScript+Smarty (Lexer)
Short names: js+smarty, javascript+smarty
Filename extensions:
Mimetypes: application/x-javascript+smarty, text/x-javascript+smarty, text/javascript+smarty
JavaScript+PHP (Lexer)
Short names: js+php, javascript+php
Filename extensions:
Mimetypes: application/x-javascript+php, text/x-javascript+php, text/javascript+php
Perl (Lexer)
Short names: perl, pl
Filename extensions: *.pl, *.pm
Mimetypes: text/x-perl, application/x-perl
SQL (Lexer)
Short names: sql
Filename extensions: *.sql
Mimetypes: text/x-sql
XML+PHP (Lexer)
Short names: xml+php
Filename extensions:
Mimetypes: application/xml+php
CSS+Ruby (Lexer)
Short names: css+erb, css+ruby
Filename extensions:
Mimetypes: text/css+ruby
Debian Sourcelist (Lexer)
Short names: sourceslist, sources.list
Filename extensions: sources.list
Mimetypes:
XML+Django/Jinja (Lexer)
Short names: xml+django, xml+jinja
Filename extensions:
Mimetypes: application/xml+django, application/xml+jinja
Java Server Page (Lexer)
Short names: jsp
Filename extensions: *.jsp
Mimetypes: application/x-jsp
XML (Lexer)
Short names: xml
Filename extensions: *.xml, *.xsl, *.rss
Mimetypes: text/xml, application/xml, image/svg+xml, application/rss+xml, application/atom+xml, application/xsl+xml, application/xslt+xml
Groff (Lexer)
Short names: groff, nroff, man
Filename extensions: *.[1234567], *.man
Mimetypes: application/x-troff, text/troff
C++ (Lexer)
Short names: cpp, c++
Filename extensions: *.cpp, *.hpp, *.c++, *.h++
Mimetypes: text/x-c++hdr, text/x-c++src
XML+Mako (Lexer)
Short names: xml+mako
Filename extensions:
Mimetypes: application/xml+mako
ERB (Lexer)
Short names: erb
Filename extensions:
Mimetypes: application/x-ruby-templating
HTML+Mako (Lexer)
Short names: html+mako
Filename extensions:
Mimetypes: text/html+mako
XML+Myghty (Lexer)
Short names: xml+myghty
Filename extensions:
Mimetypes: application/xml+myghty
Befunge (Lexer)
Short names: befunge
Filename extensions: *.befunge
Mimetypes: application/x-befunge