<pre class=" brush: cpp; auto-links: true; collapse: false; first-line: 1; gutter: false; html-script: false; light: true; ruler: false; smart-tabs: true; tab-size: 4; toolbar: false;"> #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { _tprintf(_T("Hello World!!!\n")); return 0; } </pre>
brush 属性指定编程语言,从官网(http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes)上可以看到目前 SyntaxHighlighter 支持以下编程语言的着色规则:
Brush name |
Brush aliases(属性取值) | File name |
---|---|---|
ActionScript3 | as3, actionscript3 | shBrushAS3.js |
Bash/shell | bash, shell | shBrushBash.js |
ColdFusion | cf, coldfusion | shBrushColdFusion.js |
C# | c-sharp, csharp | shBrushCSharp.js |
C++ | cpp, c | shBrushCpp.js |
CSS | css | shBrushCss.js |
Delphi | delphi, pas, pascal | shBrushDelphi.js |
Diff | diff, patch | shBrushDiff.js |
Erlang | erl, erlang | shBrushErlang.js |
Groovy | groovy | shBrushGroovy.js |
JavaScript | js, jscript, javascript | shBrushJScript.js |
Java | java | shBrushJava.js |
JavaFX | jfx, javafx | shBrushJavaFX.js |
Perl | perl, pl | shBrushPerl.js |
PHP | php | shBrushPhp.js |
Plain Text | plain, text | shBrushPlain.js |
PowerShell | ps, powershell | shBrushPowerShell.js |
Python | py, python | shBrushPython.js |
Ruby | rails, ror, ruby | shBrushRuby.js |
Scala | scala | shBrushScala.js |
SQL | sql | shBrushSql.js |
Visual Basic | vb, vbnet | shBrushVb.js |
XML | xml, xhtml, xslt, html, xhtml | shBrushXml.js |
系列文章索引:http://www.cnblogs.com/duxiuxing/archive/2012/05/29/2524243.html