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.
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)); }
Powered by: newtelligence dasBlog 2.1.8102.813
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2010, Shawn Neal
E-mail