I've been looking at ways to highlight code on my website. I've sorted the php using the built in highlight_string() function.
Now I'm looking to do HTML, CSS & JavaScript. I looked at the PEAR stuff for this and the XML highlighting looks good on HTML but the CSS & JavaScript is pretty bad, doesn't pick up /* */ comments in CSS and the JavaScript was only two colours.

So now I'm just going to write some functions myself, does anyone have any ideas on a starting point? I'm thinking some sort of recursive parser but I'm holding out for a better idea.