# DOS-format files appear to become double-spaced when pasted into question

There's this relatively common syndrome where code pasted into the question is double-spaced (with a blank line in between every line of text) -- see for instance the earliest revisions of http://stackoverflow.com/posts/5128613/revisions -- it seems to happen more often with new posters who haven't figured out how to format stuff yet, but I really doubt they're coding that way, so I wonder if there's a bug somewhere that causes DOS line endings to become extra blank lines when pasted into the question-edit box.

-

and I found that there is many \r\n\r\n sequences there. So I think that is not DOS issue, original texts is like that as is.
#include &lt;iostream&gt;\r\n\r\nusing namespace std;\r\n\r\nstruct list\r\n\r\n{\r\n\r\nchar name[20];\r\n\r\nint age;\r\n\r\ndouble height;\r\n\r\nlist *next;\r\n\r\n};\r\n\r\nlist *first = NULL, *current=NULL;\r\n\r\nint optn = 0;\r\n\r\nvoid currentfor()\r\n\r\n    {\r\n\r\n        if (current==NULL)\r\n\r\n        {\r\n\r\n         cout &lt;&lt; &quot;Current is invalid&quot; &lt;&lt;.....

Select the raw code, and ctrl+k would be ok for code blocks normally, IHMO. I don't think SO will convert \r\n to \r\n\r\n though. –  YOU Feb 26 '11 at 18:50