Friday, 20 March 2009

Windows Live Writer + Custom Code Paste Plug-in = W00t!

When I started this blog, I figured that I’d use Windows Live Writer (WLW), under the banner of “you’re a .NET guy, so pimp out the MS technology, you brand whore”. And so far, I don’t mind what I see.

As a developer/architect, one of the things (hopefully) that will provide some value out of my blog posts is sample code. There are a few plug-ins for WLW available that do code formatting, but there are a few issues, particularly around the format of your code when posted to your blog host (in my case, Blogger). Line breaks in the source code in particular are treated badly when published.

My first attempt at posting code clips resulted in poorly formatted code (initially, anyway – it’s since been cleaned up), which annoyed me to no end. With a bit of digging around, I found a couple of blog posts that, when combined, give you code post joy.

Between the two of these posts, I was able to build something that solved my ugly formatting problems. From here on out, there shouldn’t be any formatting dramas.

No comments:

Post a Comment