How do I syntax highlight my code with xinotes? 


April 22, 2007 21:58:45    Last update: January 19, 2009 20:26:12
Your code will be syntax highlighted when you specify the language of your code with the BBcode code tag:

[code=lang]Your code here[/code]

where "lang" is the language of your code. For example, the following Perl code

print "Hello World!\n";

is rendered with:

print "Hello World!\n";

The following are supported languages and their corresponding names for BBcode:
Apache conf: apacheconf, aconf, apache
Bash, sh: bash, sh
C: c
C++: cpp, c++
C#: csharp, c#
Cascading Style Sheets (CSS): css
Delphi, Pascal, Object Pascal: delphi, pas, pascal, objectpascal
Diff file: diff
DOS/Windows batch: bat
Haskell: haskell
HTML: html
INI file: ini, cfg
Java: java
JavaScript: js, javascript
JSP: jsp
Makefile: make, makefile, mf
Objective C: objective-c, objectivec, obj-c, objc
Perl: perl, pl
PHP: php
Python: python, py
Python Console: pycon
Ruby: ruby, rb
Ruby Console: irb
Scheme: scheme
SQL: sql
Tex, LaTex: tex, latex
VB.Net:, vbnet
XML: xml

The full list is available from, which is our backend engine for syntax highlight rendering.
Share |
| Comment  | Tags