使用syntaxhighlighter在文章中显示代码

Posted by eDWARD at 10:43

  之前一直使用Yahoo UI工具包中自带的syntaxhighlighter作为代码显示工具,但是版本比较低,支持的语言种类也相对较少,这次借着升级wordpress的机会去了SyntaxHighlighter的网站下载并安装了最新的版本。新版本的SyntaxHighlighter支持更多语言种类和别名标记,而且样式也更加美观了。

Supported languages

Here's a list of supported languages and their aliases:

Language Aliases
C++ cpp, c, c++
C# c#, c-sharp, csharp
CSS css
Delphi delphi, pascal
Java java
Java Script js, jscript, javascript
PHP php
Python py, python
Ruby rb, ruby, rails, ror
Sql sql
VB vb, vb.net
XML/HTML xml, html, xhtml, xslt

一段Python代码

Filed In 学习路上 | Study | Tags: , | 8 Comments »

Your Comments.

Leave your own response

8 Responses to “使用syntaxhighlighter在文章中显示代码”

Leave a Reply.

Comment Form.

Fields denoted with a "*" are required. Your comment may require moderation, please be patient.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>




Your Reply.

Use the following link to trackback from your own site:
http://www.zhangzhang.net/2008/01/use-syntaxhighlighter/trackback/

Spread the word.

Octopus supports RSS feed for this post RSS 2.0 , and Trackbacks from other blogs.


Fatal error: Call to undefined function get_single_sidebar() in /home/zhangzha/public_html/wp-content/themes/octopus/single.php on line 69