I'm trying to hack up the WLWPluginsCollection to show source code on Blogger, and I'm getting incorrect output. I've built and modified the code to track down the issue as far as I can.
The root problem is that Blogger takes any newline it sees and turns it into a <BR/> tag. (This is annoying but probably useful for plain old text posts.) This shouldn't be so bad; I can always have the plugin return content that doesn't have any newlines where I don't want them, right? Nope - for some reason WLW inserts spurious newlines between the PRE elements that the plugin returns.
The plugin returns this to WLW:
<pre>sometext</pre><pre>someothertext</pre>
but the WLW HTML view shows that WLW has turned this into
<pre>sometext</pre>
<pre>someothertext</pre>
The result is that when Blogger gets this, it sees the newlines and turns them into <br />, with the final in-blog result being
<pre>sometext</pre><br /><br /><pre>someothertext</pre>
Why is WLW modifying the output of the plugin at all? You can parse it for validity without altering it. Can we have WLW modified to not touch the output from plugins?