Hack: GeSHi Code Highlighting


Here is how you can quickly add GeSHi code highlighting to your Wacko installation:

  1. cd formatter/highlight/
  2. wget https://github.com/GeSHi/geshi-1.0/archive/RELEASE_1_0_8_12.tar.gz
  3. tar xzvf GeSHi-
  4. rm GeSHi-
  5. mkdir old; mv {css,html,java,pascal,php,sql}.php old/ Get rid of older support.
  6. Build a list of names of GeSHi files, I did this with ls geshi/geshi -1 | awk -F. '{print $1}' > names
  7. You might want to open up names and change html4strict to just html.
  8. Run the below script in that directory, change as needed.
  9. You can then do things like %%(perl) %% and it will work more or less as expected.
  10. This is intended to get you there quickly, you may want to extend this further on your own.


for x in `cat names`; do

cat < $x.php
echo "";
echo "<div class="\"code\"">";
echo \$geshi->parse_code();
echo "</div>";
echo "";