Skip navigation.

SxSW 2005All recent postsOnline Political Campaigns and Accessibility

Source Code Highlighter

I’ve run a source code highlighter on this site for a while now (see announcement from last year). Over the past couple of days I cleaned it up and rolled it into a library, which now also powers a sparkling new online source code viewer.

I’m going to use the source code viewer to post samples (which I normally make available for download, too). For example, see the C# code behind the Markdown and SmartyPants converter.

The highlighter library now supports line numbering too, but I’ll disable it in the source code viewer in case you, guys, need to copy and paste code.

I’m going to test the highlighter library some more and then make it available for download. As a reminder, the following syntax is supported:

Once the library “hits the streets” y’all can extend it and add more languages to it. I’ll be happy to integrate them and give you all the credit you deserve.

I still claim my code highlighter produces the smallest footprint and generates valid XHTML code. :)

Comments

Comment permalink 1 Dave Harsh |
Of course, using a proper browser such as Firefox your source code is nicely formatted and coloured in anyway....

Still, I suppose this must have its uses for those people still on IE.
Comment permalink 2 Sammy |
You are a very sweet person!
Comment permalink 3 Jim |
Any date on when the library will be available for download?
Comment permalink 4 Milan Negovan |
Ahem... The date keeps slipping. :)

Emails and Notifications

Would you like to be notified when somebody responds to this post?  Would you like to have these comments emailed to you?

TrackBacks

Sorry, TrackBacks are not allowed.

Submit your comment

Please enter only text since all HTML tags except hyperlinks will be stripped. Hyperlinks will become live links. Any comments with flaming or offensive language will be deleted. Be courteous to other posters. Thank you.

Your name (required):
Your email (optional):
Your site's URL (optional):
Enter this number
Type in the number above:
Comment (required):