SyntaxHighlighter Evolved这个插件很好用,但是就是有时候不知道自己的代码它支不支持,百度和官网都找不到具体的说明,不过在后台插件编辑中看到这些代码,那我就放心使用了!
[php autolinks=”false” classname=”myclass” collapse=”false” firstline=”1″ gutter=”true” htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”true” title=”example-filename.php”]
$this->brushes = (array) apply_filters( ‘syntaxhighlighter_brushes’, array(
‘as3’ => ‘as3’,
‘actionscript3’ => ‘as3’,
‘bash’ => ‘bash’,
‘shell’ => ‘bash’,
‘coldfusion’ => ‘coldfusion’,
‘cf’ => ‘coldfusion’,
‘clojure’ => ‘clojure’,
‘clj’ => ‘clojure’,
‘cpp’ => ‘cpp’,
‘c’ => ‘cpp’,
‘c-sharp’ => ‘csharp’,
‘csharp’ => ‘csharp’,
‘css’ => ‘css’,
‘delphi’ => ‘delphi’,
‘pas’ => ‘delphi’,
‘pascal’ => ‘delphi’,
‘diff’ => ‘diff’,
‘patch’ => ‘diff’,
‘erl’ => ‘erlang’,
‘erlang’ => ‘erlang’,
‘fsharp’ => ‘fsharp’,
‘groovy’ => ‘groovy’,
‘java’ => ‘java’,
‘jfx’ => ‘javafx’,
‘javafx’ => ‘javafx’,
‘js’ => ‘jscript’,
‘jscript’ => ‘jscript’,
‘javascript’ => ‘jscript’,
‘latex’ => ‘latex’, // Not used as a shortcode
‘tex’ => ‘latex’,
‘matlab’ => ‘matlabkey’,
‘objc’ => ‘objc’,
‘obj-c’ => ‘objc’,
‘perl’ => ‘perl’,
‘pl’ => ‘perl’,
‘php’ => ‘php’,
‘plain’ => ‘plain’,
‘text’ => ‘plain’,
‘ps’ => ‘powershell’,
‘powershell’ => ‘powershell’,
‘py’ => ‘python’,
‘python’ => ‘python’,
‘r’ => ‘r’, // Not used as a shortcode
‘splus’ => ‘r’,
‘rails’ => ‘ruby’,
‘rb’ => ‘ruby’,
‘ror’ => ‘ruby’,
‘ruby’ => ‘ruby’,
‘scala’ => ‘scala’,
‘sql’ => ‘sql’,
‘vb’ => ‘vb’,
‘vbnet’ => ‘vb’,
‘xml’ => ‘xml’,
‘xhtml’ => ‘xml’,
‘xslt’ => ‘xml’,
‘html’ => ‘xml’,
) );
[/php]
测试
[css autolinks=”false” classname=”myclass” collapse=”false” firstline=”1″ gutter=”true” highlight=”1-3,6,9″ htmlscript=”false” light=”false” padlinenumbers=”false” smarttabs=”true” tabsize=”4″ toolbar=”true” title=”example-filename.php”]这里写你的代码[/css]