View Full Version : Javascript Syntax Highlighting

12-03-2010, 11:17 PM
Good day,

I've started a mini-project on stealthiscode.net - I've been meaning to give some of my code away for some time now. I want to include syntax highlighted code snippets and really have better things to do than write my own.

I've resorted to highlight_string() for the PHP code (I had some lovely code working with token_get_all(), but the damn thing compresses whitespace...)

Can anyone recommend a *good*, well written Javascript syntax highlighter in PHP?

Chiz muchly.

12-03-2010, 11:47 PM
Never used it personally, but Geshi seems to be the most commonly used one:


12-03-2010, 11:58 PM
Wow, that is a massive amount of code. I'll give it a try, thanks :)

12-04-2010, 01:00 AM
I've implemented it now, and I'm very impressed. The way it integrates CSS is a little awkward, but I made a caching php script to combine a bunch of relevant CSS...

Thanks for the tip.