WP-Syntax代码书写格式
//这里添加代码……
其中,lang="html"表示代码语言为html,请根据自己需要修改; line="1"表示显示行号,如果不需要,去掉即可;escaped="true" 是为了防止代码转义,如果不需要,去掉即可,文档一定要在文本模式下更改,在可视化模式下很多符号会转成转义字符。
支持的语言如下:abap, actionscript, actionscript3, ada, apache, applescript, apt_sources, asm, asp, autoit, avisynth, bash, bf, bibtex, blitzbasic, bnf, boo, c, c_mac, caddcl, cadlisp, cil, cfdg, cfm, cmake, cobol, cpp-qt, cpp, csharp, css, d, dcs, delphi, diff, div, dos, dot, eiffel, email, erlang, fo, fortran, freebasic, genero, gettext, glsl, gml, bnuplot, groovy, haskell, hq9plus, html4strict, idl, ini, inno, intercal, io, java, java5, javascript, kixtart, klonec, klonecpp, latex, lisp, locobasic, lolcode lotusformulas, lotusscript, lscript, lsl2, lua, m68k, make, matlab, mirc, modula3, mpasm, mxml, mysql, nsis, oberon2, objc, ocaml-brief, ocaml, oobas, oracle11, oracle8, pascal, per, pic16, pixelbender, perl, php-brief, php, plsql, povray, powershell, progress, prolog, properties, providex, python, qbasic, rails, rebol, reg, robots, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, sql, tcl, teraterm, text, thinbasic, tsql, typoscript, vb, vbnet, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xml, xorg_conf, xpp, z80
'actionscript'=>array('as'),'ada'=>array('a','ada','adb','ads'),'apache'=>array('conf'),'asm'=>array('ash','asm','inc'),'asp'=>array('asp'),'bash'=>array('sh'),'bf'=>array('bf'),'c'=>array('c','h'),'c_mac'=>array('c','h'),'caddcl'=>array(),'cadlisp'=>array(),'cdfg'=>array('cdfg'),'cobol'=>array('cbl'),'cpp'=>array('cpp','hpp','C','H','CPP','HPP'),'csharp'=>array('cs'),'css'=>array('css'),'d'=>array('d'),'delphi'=>array('dpk','dpr','pp','pas'),'diff'=>array('diff','patch'),'dos'=>array('bat','cmd'),'gettext'=>array('po','pot'),'gml'=>array('gml'),'gnuplot'=>array('plt'),'groovy'=>array('groovy'),'haskell'=>array('hs'),'html4strict'=>array('html','htm'),'ini'=>array('ini','desktop'),'java'=>array('java'),'javascript'=>array('js'),'klonec'=>array('kl1'),'klonecpp'=>array('klx'),'latex'=>array('tex'),'lisp'=>array('lisp'),'lua'=>array('lua'),'matlab'=>array('m'),'mpasm'=>array(),'mysql'=>array('sql'),'nsis'=>array(),'objc'=>array(),'oobas'=>array(),'oracle8'=>array(),'oracle10'=>array(),'pascal'=>array('pas'),'perl'=>array('pl','pm'),'php'=>array('php','php5','phtml','phps'),'povray'=>array('pov'),'providex'=>array('pvc','pvx'),'prolog'=>array('pl'),'python'=>array('py'),'qbasic'=>array('bi'),'reg'=>array('reg'),'ruby'=>array('rb'),'sas'=>array('sas'),'scala'=>array('scala'),'scheme'=>array('scm'),'scilab'=>array('sci'),'smalltalk'=>array('st'),'smarty'=>array(),'tcl'=>array('tcl'),'vb'=>array('bas'),'vbnet'=>array(),'visualfoxpro'=>array(),'whitespace'=>array('ws'),'xml'=>array('xml','svg'),'z80'=>array('z80','asm','inc')