WP-CodeBox所支持的所有语言
Usage
Example 1: PHP, no line numbers
<pre lang="php"> <?php function foo() { echo "Hello World!\\n"; } for (\$i = 0; \$i < 10 $i++) { foo(); } ?> |
Example 2: Java, with line numbers,collapse codebox
1 2 3 4 5 6 | <pre lang="java" line="1" colla="-"> public class Hello { public static void main(String[] args) { System.out.println("Hello World!"); } } |
Example 3: Ruby, with line numbers starting at 18, code downloading(ruby.txt)
18 19 20 21 22 23 | <pre lang="ruby" line="18" file="ruby.txt"> class Example def example(arg1) return "Hello: " + arg1.to_s end end |
Supported Languages
The following languages are supported in the lang attribute:
abap, actionscript, ada, apache, applescript, asm, asp, autoit, bash, blitzbasic, bnf, c, c_mac, caddcl, cadlisp, cfdg, cfm, cpp-qt, cpp, csharp, css, d, delphi, diff, div, dos, dot, eiffel, fortran, freebasic, genero, gml, groovy, haskell, html4strict, idl, ini, inno, io, java, java5, javascript, latex, lisp, lua, m68k, matlab, mirc, mpasm, mysql, nsis, objc, ocaml-brief, ocaml, oobas, oracle8, pascal, per, perl, php-brief, php, plsql, python, qbasic, rails, reg, robots, ruby, sas, scheme, sdlbasic, smalltalk, smarty, sql, tcl, text, thinbasic, tsql, vb, vbnet, vhdl, visualfoxpro, winbatch, xml, xpp, z80
近期评论