Syntax Highlighting with GeSHi and csh_geshi plugin
Posted by project_00 in Other IT Stuff Worth Knowing, PHP, Perl, OthersWarning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Pasting code in Wordpress is not an easy task, Wordpress will tend to mess it up by applying filters to it. The GeSHi (Generic Syntax Highlighter) project not only prevents that, but also provides syntax highlight as well. To use it, you will need a Wordpress plugin. The WordPress csh GeSHi Plugin does that job well, the syntax is easy and is easily configurable. You will have to disable Wordpress’s rich text editor though, at least when you need to paste code samples.
Some examples of the combination in action.
Simple:
function square(num) { return num*num; }
With line numbering:
public Student(String name, String matricNo)
{
this.name=name;
this.matricNo=matricNo;
}
}
Start line numbering from 10
Tags: GeSHi
SELECT * FROM product WHERE price>100 AND type='ELECTRONICS'; SELECT * FROM staff WHERE name LIKE '%JOHN%'; SELECT * FROM store WHERE manager='HENRY LEE';
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Warning: Division by zero in /home/content/p/r/o/project00/html/blog/wp-content/plugins/geshi/geshi.php on line 2310
Related posts:
- Some things to note when upgrading to WordPress 2.3 Was upgrading to WP 2.3, got the following error message during the course of upgrading....
- 17 days into work as part-time IT executive There are 5 people working in my company, 3 part-timers and none of the part-timers...
- phpBB forum – using the default DB object Have been doing a little freelance lately, mainly involving integrating new functionality with phpBB. Using...
- Maven2 – installing 3rd party JARs Have a little time these few days, trying to get familiarised with Maven2. Not for...

Entries (RSS)
My first time to know about this plugin. WordPress csh GeSHi Plugin? It really sounds new to me. I will review more about it first before installing. Thanks!