- October 3rd, 2011
- Write comment
As many of you know I have written a few extensions for Visual Studio. The most popular by far are “Solution Explorer Tools” and “Code alignment”. Each only a few downloads short of reaching 6500 downloads.
I get a few queries and comments about these extensions, but the MSDN’s Q and A section has a major problem in it.
For some reason it has decided that you don’t need new lines. and just replaces them with a single space. Now on some forums, this might be understandable. You want comments kept short, and you don’t want them to take up screens so why not? But this is a Q and A for developers. Developers asking and answering questions about an extension to visual studio. It’s quite often they want to enter code.
So what does that mean? Well let’s say in my comment I wrote…
var foo = "Hello World";
for (int i = 0; i < 10; i++)
Console.WriteLine(foo + i);
when I submit it, it would become
var foo = "Hello World"; for (int i = 0; i < 10; i++) Console.WriteLine(foo + i);
And that’s just for a simple case, many of the times I’ve seen this happen the result itself wraps over 10 lines. It’s ugly and unreadable.
MSDN didn’t use to act this way, it respected new lines but then they changed it for some unknown reason. On a side note it has also never respected multiple spaces and I’ve had to replace spaces with ` to make the formatting appear correct – pretty crummy for a developer Q and A.
It’s especially annoying for my code alignment extension. The extension aligns characters across lines, so when people post suggestions they post multiple lines – which gets swallowed up by this bug.
It’s ironic that for my extension that encourages good formatting of code, it has a the Q and A section which doesn’t allow any formatting.
I hope Microsoft fixes this problem soon. I can’t be the only person who is annoyed by this.