Client-Side code highlighting

When I visited Alex Gorbatchev's blog, I noticed he had a unique client-side code highlighting solution in place, one I hadn't seen anywhere else. That's something I've wanted on my blog for a while; the vanilla <PRE> sections I've been using are servicable, but primitive. Although I loves me some regex, I don't know squat about PERL so I've been hesitant to hack anything fancier into my Movable Type install.

This is a companion discussion topic for the original blog entry at:

Alex and I are currently… uh… wrangling with the fact that there isn’t an .innerText property on elements in Mozilla/Firefix.

There is an .innerHTML property, but there are some bizarre ramifications when the “HTML” has escaped markup inside of it. It’s more subtle (buggy?) than you might think.

More details in the comments at his blog:

Just a heads up :slight_smile: new version 1.0.4 is out

This is now in Google’s code repository.

Gee, great thing we got that all figured out, right?

…right? :stuck_out_tongue: