Andrew Maddison

Flowerchild.

Syntax Highlighting Code in Subtext

Quick post-it post:

The syntax highlighting in my last post came from: http://www.manoli.net/csharpformat/ it works nice and easily, although you do have to include some CSS on the page (no great hardship).

(found via this blog post from Phil Haack http://haacked.com/archive/2004/06/16/code-to-html-syntax-highlighting.aspx)

Again, there’s probably a better way, and I need to figure how to stop long lines from overflowing their container, but that’s a problem for another day.

Edit: Fixed it, I simply added “overflow: auto;” to the CSS for the pre tags. it’s a little irritating in IE7 or below, but fine in all the proper browsers I tested.

Comments