# Friday, August 01, 2008
« Syntax Highlighter for WLW | Main | No, he'll be an engineer »

I finally figured out why my code snippets are all so horribly formatted via RSS, and it has nothing to do with the different source code formatters I've been using and everything to do with dasBlog.  I grabbed the dasBlog source and found the problem is with dasBlog's HTML tidy class, but more importantly I also found in the source how to disable it.  The latest dasBlog source has an option to disable formatting.

image

In the latest version of dasBlog they've added a setting to disable RSS formatting. Notice the setting even mentions "may mess up pre whitespace."  Mess up pre whitespace?  Yeah, no kidding.

At least now I don't have to switch blogging platforms, as the upgrade to dasBlog 2.0 is a whole lot easier.  Here's the dasBlog source code that optionally disables the formatting:

if (siteConfig.HtmlTidyContent == false)
{
    item.Description = "<div>" + PreprocessItemContent(entry.EntryId, entry.Content) + "</div>";
}
else
{
    item.Description = ContentFormatter.FormatContentAsHTML(PreprocessItemContent(entry.EntryId, entry.Content));
}
Comments are closed.