Code Snippet is WordPress plugin for displaying code with highlighting in blog posts using the GeSHi engine.
Author: | Roman Roan (profile at wordpress.org) |
WordPress version required: | 2.0 |
WordPress version tested: | 2.9.2 |
Plugin version: | 2.1.7 |
Added to WordPress repository: | 17-03-2007 |
Last updated: | 13-03-2010
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
|
Rating, %: | 20 |
Rated by: | 1 |
Plugin URI: | http://blog.hackerforhire.org/code-snippet/ |
Total downloads: | 26 792 |
Active installs: | 40+ |
Click to start download |
Code Snippet was created by Roman Roan and originally hosted at http://blog.enargi.com. It is powered by the GeSHi engine and is quite possibly the best syntax highlighting engine for WordPress. A large number of languages are supported and it can be easily extended. Since his blog is no longer functioning, I’m attempting to keep his wonderful contribution available so I’ve given it a home at http://blog.hackerforhire.org/code-snippet/. If you find any bugs with it, let me know and I will do my best to resovle them.
Usage
The original author recommended always wrapping your code in a <pre> tag; however, most times you generally don’t need to. To use it, simply surround your code with as such and specify your language type:
[code lang=”c”]
int main(int argc, char** argv) { return 0; }
[/code]
And the result is:
int main(int argc, char** argv) { return 0; }
Supported Languages
This tool uses the GeSHi library. Any supported language there should work just fine with Code Snippet. See http://qbnz.com/highlighter/ for details.