Formatted sourcecode in WordPress: uses SyntaxHighlighter 3.0; complete list of supported languages
Posted by jpluimers on 2011/01/18
In the past I wrote a few blog posts on posting sourcecode in WordPress.
Nick Hodges‘ last Flotsam and Jetsam blog post pointed me to the SyntaxHighlighter JavaScript that is used by WordPress and many other engines/sites.
Their site contains an even more elaborate list of supported languages.
I had the basic list right in my last post, but was missing all the aliases (which often are easier than the longer proper names).
This is the new table adapted from their list:
Language “Brush aliases” | Language “Brush name” |
---|---|
as3, actionscript3 | ActionScript3 |
bash, shell | Bash/shell |
cf, coldfusion | ColdFusion |
c-sharp, csharp | C# |
cpp, c | C++ |
css | CSS |
delphi, pas, pascal | Delphi |
diff, patch | Diff |
erl, erlang | Erlang |
groovy | Groovy |
js, jscript, javascript | JavaScript |
java | Java |
jfx, javafx | JavaFX |
perl, pl | Perl |
php | PHP |
plain, text | Plain Text |
ps, powershell | PowerShell |
py, python | Python |
rails, ror, ruby | Ruby |
scala | Scala |
sql | SQL |
vb, vbnet | Visual Basic |
xml, xhtml, xslt, html, xhtml | XML |
The left column can be used as the language=’xx’ parameter in a sourcecode block.
The right colum links to the JavaScript source that implements that particular brush.
–jeroen
Christian Wimmer said
Do they support “” in Delphi code finally?
Christian Wimmer said
Yes, that I meant:
< and >
jpluimers said
I think I posted Delphi code with those in the past, so yes: that should work.
–jeroen
Christian Wimmer said
Well, did you use a greater/smaller comparison?
jpluimers said
Yes, for instance this one: https://wiert.wordpress.com/2009/10/27/delphi-for-in-on-enumerated-data-types/