wordpress插件:SyntaxHighlighter2用法

[sourcecode language=”c++”]
#include <stdio.h>
void main(void) {
printf(“Hello, world\r\n”);
}
[/sourcecode]

将显示为:
[sourcecode language=”c++”]
#include
void main(void) {
printf(“Hello, world\r\n”);
}
[/sourcecode]
支持的代码种类:
C++ — cpp, c, c++
C# — c#, c-sharp, csharp
CSS — css
Delphi — delphi, pascal
Diff/Patches — diff
Groovy — groovy
Java — java
JavaScript — js, jscript, javascript
Perl — perl
PHP — php
Plain text — plain
Python — py, python
Ruby — rb, ruby, rails, ror
Scala — scala
SQL — sql
VB — vb, vb.net
XML/HTML — xml, html, xhtml, xslt

参考:
作者的主页,应该错不了。SyntaxHighlighter2

转义符

打赏

发表评论

电子邮件地址不会被公开。 必填项已用*标注