Hubology: F# source HTML color coding native on The Hub
Scott Isaacs (sisaacs) and I have been working to get an addin for automatic color coding of F# working here on The Hub. Scott came up with the idea the other day and he and I worked through all of the details recently.
There is a CS2.0 addin that supports formatting of most source code types, e.g. C#, VB.NET, ASP.NET, SQL, etc. on pages in a CS site (hubFS is a CS2.0 site). F# is not supported natively by the addin, but the addin does allow for new languages to be added as needed. So Scott installed the addin, constructed a placeholder for F# in the XML for the addin, created the F# icon for the addin's toolbar (so F# can be used from the Rich Text Editor in CS for ANY authoring). While he did that, I worked on the first draft of the language elements that were needed in the XML file. He and I ran tests on a few snippets of code and after a few problems (that Scott found and fixed; someone has to correct my stuff), we are up and running.
Use this stuff. Pound on it. Let Scott or I know of problems, bugs, what works, what doesn't, what should be colored differently, etc. It is important to note that this feature is an HTML render-time feature, i.e.
We will use this internally within The Hub until "go live". Scott will coordinate with the addin author so that F# is included in native support after that time. So I am clear, this means that anyone that uses the addin on a CS2.0 site, will have native F# color coding for all F# source code that they mark on their site.
Scott's post to introduce this is My Second F# Code. The How To's and Snippets post is Coloring Your Code on The Hub. Scott has the link for the CS2.0 addin (for those that want color coding now and F# color coding soon)
Nice work Scott (and it was fun working with you to make this happen).
[Updated to add]: This facility supports "post preview" mode in forum post authoring. It does NOT support post preview mode in blog entry authoring. For the moment, if you are doing a blog entry, open a temporary post on a forum, markup your F# code, preview it, and then cut and paste it into your blog entry (with the native tags around the code to ensure the above mentioned page render-time formatting). Scott will contact the addin author to determine if this can be fixed.