Memo: SyntaxHighlighter 的使用

来源:互联网 发布:log4j2 日志数据库 编辑:程序博客网 时间:2024/06/11 01:19

SyntaxHighlighter 作为一款比较优秀且常见的代码高亮插件,这里给出一个用法说明作为 Memo。

[csharp]
namespace Test
{
#region using directives

using System;

#endregion using directives

internal class Program
{
private static void Main(string[] args)
{
Console.WriteLine("Hello, World!");
}
}
}
[/csharp]

Plugin Usage
Just wrap your code in [language], such as

[[php]code here[/php]]

or

[[css]code here[/css]]

For a list of supported languages you could refer to the following table. And you do not need to escape HTML entities or anything, just post your code as-is. The plugin will handle the rest.

Brush nameBrush aliasesActionScript3as3, actionscript3Bash/shellbash, shellColdFusioncf, coldfusionC#c-sharp, csharpC++cpp, cCSScssDelphidelphi, pas, pascalDiffdiff, patchErlangerl, erlangGroovygroovyJavaScriptjs, jscript, javascriptJavajavaJavaFXjfx, javafxPerlperl, plPHPphpPlain Textplain, textPowerShellps, powershellPythonpy, pythonRubyrails, ror, rubyScalascalaSQLsqlVisual Basicvb, vbnetXMLxml, xhtml, xslt, html, xhtml

你可以从这里得到更多关于这个插件的信息: http://alexgorbatchev.com/SyntaxHighlighter/manual/brushes/

查看原文:http://nap7.com/me/syntaxhighlighter-usage/

0 0