因为自己的BLOG中贴代码会比较多,帮考虑用JS来实现对code的语法标亮效果。
以前曾看过了下dp.SyntaxHighlighter,但并未深入研究-_-
在新的BLOG中打算加入代码标亮功能,这段时间就先好好研究研究:)
参考地址:http://www.dreamprojections.com/syntaxhighlighter/ dp.SyntaxHighlighter is a free JavaScript tool for source code syntax highlighting.
The script is meant to help a developer to post code snippets online with ease and without having to worry about applying format. People who use blogs like MovableType, .Text (dotText), dasBlog and any other system can easily add code to their posts.
If you are looking to get syntax highlighter for your blog, give dp.SyntaxHighlighter a try!
演示地址:
http://www.cnlei.com/codelab/SyntaxHighlighter_1.4.1/index.html