Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 158 Stack Exchange communities.

What is meta?
Here's how it works:
  1. Any Stack Exchange user can ask a question
  2. The community provides support, votes on ideas, and reports bugs
  3. Your voice helps shape the way Stack Exchange operates

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 -- 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.

share|improve this question

When I fetched original poster's source,

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 <iostream>\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 << "Current is invalid" <<.....
share|improve this answer
Hmm. The original poster commented "I tried putting the code without spaces but it looked so messed up in the preview.So wen i put spaces it came out decently in the coding format". So it looks like you're right and what we really need is to improve the UI for triggering code formatting. – zwol Feb 26 '11 at 18:39
I must be missing something here. There's a tool for marking something as code. It's on the line that begins with the "B for bold" tool. It looks like a pair of braces. I like the way it formats code just fine. – Walter Mitty Feb 26 '11 at 18:42
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .