What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 122 Stack Exchange communities.

I am aware that comments have only a simple field, with no formatting possible and that is fine (if formatting is needed, your comment should actually be an answer!)

But I find some comments hard to read because they are mainly one giant line (of up to 600 characters!).
Any newlines entered during the redaction of the message is stripped from the published comment.

Would it be possible to preserve those newlines?
(but may be deleting empty lines, to prevent abuses like a comment taking 600 lines because a prankster could find amusing to post a 600 newlines comment!)

Let's recap:

  • what we need (and can actually preview while typing a comment, making it more readable, both for the writer -- and the reader, should newlines being kept):
    declined for newlines (why? no reason given at this time.)

  • what we don't need but is "nice to have" (even though we cannot preview those):
    granted for bold and italic text.

  • what we really don't need (and cannot not preview):
    granted for... __code sample__!? Code sample? Seriously? In a comment?

In short:
What was an incentive to post a new answer (because of the lack of formatting) is now further diminished.
But the comments remain published as one long-hard-to-read-gigantic line.

share|improve this question
Note: one possible other specification: make sure each line is at least 'x' characters (to avoid another abuse: 300 lines of one char and one newline!) –  VonC Jun 28 '09 at 14:54
Bad comments will always be possible - just flag them rather than trying to work out complex rules to prohibit them. –  Jon Skeet Jun 28 '09 at 15:02
Or 600 characters or 10 lines, whichever comes first. –  Dennis Williamson Jun 28 '09 at 19:42
it is unlikely we will provide newlines, but see below that bold and italic and code __sample__ now work. –  Jeff Atwood Jul 3 '09 at 22:36
@Jeff: Bold, italic and code-view are great in the comments! --- I support VonC's suggestion about decreasing the size of comments from 600 characters, for instance, to 400. --- We need statistical data to see which is the distribution of comment lengths to decide which length SO-family should use. –  Masi Jul 5 '09 at 15:14
@Masi: boo! I love long comments. Knowing that 90% of comments are under 200chars is of little comfort when you're trying to finish a reply and run out of room. –  Shog9 Jul 5 '09 at 15:38
"code samples" in comments can be useful, for example saying.. "shouldn't printf_("something") be printf("something")" (espicially now * and _ are used for formatting) –  dbr Jul 5 '09 at 20:30
Some people like to type things using separate lines.\n They do this for effect. –  bobobobo Sep 5 '10 at 0:01
I'd pay for newlines. –  David Murdoch Mar 1 '11 at 16:34
+1 for wanting newlines. @Jeff - it sounds like you've all made up your minds to never allow newlines - why, if people want them? –  Max Williams Mar 30 '11 at 14:43
@Max: don't forget we are talking about a pre-"venture capital" feature request here. They have now a much larger team and can revisit any request they want. What was firmly refused then could evolve today. –  VonC Mar 30 '11 at 15:41
+1 for new-line –  user823959 Jul 2 '11 at 17:00
I really needed a newline for a short code sample on askubuntu.com. In the comment I had to suggest a couple of lines that someone should add into their ~/.inputrc file, to create some behaviour they desired, and it was convoluted trying to explain that I had substituted some other character in my code sample because I couldn't show in my comment where they needed a newline –  wim Apr 12 '13 at 2:24
Yes, even Get Satisfaction allows newlines in comments (it is inferior in many ways to Stack Exchange). –  user215114 Apr 30 '13 at 18:52
At the moment is possible to put newline in comments or not? –  Revious Feb 25 at 11:37
show 1 more comment

4 Answers

up vote 40 down vote accepted

This is particularly relevant when one comment is being used to reply to more than one other comment, for example:

@Foo: Yes, that's certainly a problem. Will edit.

@Bar: No, "pass by reference" and "pass reference by value" aren't the same thing.

@Baz: You should definitely be using Joda Time.

That's a lot easier to read (IMO) than:

@Foo: Yes, that's certainly a problem. Will edit. @Bar: No, "pass by reference" and "pass reference by value" aren't the same thing. @Baz: You should definitely be using Joda Time.

Personally I'd like a few other bits of markdown to be available in comments, but I know Jeff wants to discourage more significant comments - it ends up leading to discussion rather than Q&A. Personally I like discussion, but it's Jeff's prerogative :)

share|improve this answer
You could always add the replies one at a time. –  ChrisF Jun 28 '09 at 17:31
@ChrisF: That becomes a pain when you have to wait 30 seconds between comments. I run into that threshold frequently :( That wouldn't help with other situations where a linebreak would be helpful, either. –  Jon Skeet Jun 28 '09 at 17:52
I have the same problem as Jon. --- @Jeff: Please, decrease the threshold to 15 seconds at least. –  Masi Jul 5 '09 at 15:16
pubic static void main(string[] args) bold and an italic –  Chris S Jul 15 '09 at 13:50
add comment

To help a highly anguished user from math.SE which hopes that new line in comments should be allowed, I have migrated his reasoning here

The comment length here is such that it corresponds to what normally is a long paragraph in usual written communications.

In some situations, it is more natural to write two short paragraphs, or one bigger paragraph followed by a short conclusion on another line.

Implementing this would be very helpful. So far, to achieve this effect, I had resorted to inserting a blank MathJaX line inside the comment. It works, but the spacing created is way too big.

Please end this continuing bother and misery and allow newlines inside comments. It would allow much better formatted comments in certain situation.

People keep hitting enter key while typing comments, and the reason is that it is very natural sometimes to break a long comment into two paragraphs. Not only that the "comment" box works like an HTML textarea, but also it is true that it is natural to insert multiple paragraphs in this textarea.

So please try to incorporate this feature. This would also alleviate a lot of ongoing friction, and gratuitous humiliation meted out to particular users on this account.

If there are others feeling the same way, please try to post other similar feature-requests. Perhaps the higher-ups might change the mind when there is enough demand. This or that particular request might get ignored in the past; but it is worthwhile if it is done in the end.

share|improve this answer
+1 for posting it here, having seen that both Jon Skeet and VonC are (or at least were) in favour of this feature, I think it's definitely worth re-visiting. However, I don't think this takes away from the fact that loooong threads of loooong comments are Not A Good Thing™. –  Benjol Dec 10 '10 at 14:03
add comment

The fact is, continued discussions go on anyway. It's just substantially more irritating to format them. On sites with MathJax enabled, there is a hack that allows this, and this has not really damaged the stackexchange model. Maybe the administrators, with concrete evidence that it doesn't cause problems, will change their minds on this issue.

share|improve this answer
add comment

As Jeff wants to keep comments as simple as possible to avoid continued discussion, I would like to see two markups for comments - newlines and hyperlinks. I find it annoying to have to copy a link someone posts in a comment (even with Chrome's "Paste and Go" feature).

Edit: Apparently I'm stupid - dbr points out that links are automatically being href'd. I'm not sure how I managed to miss that one...

share|improve this answer
Links should automatically be a-href'd: stackoverflow.com –  dbr Jun 28 '09 at 20:18
I think he means that you can give another text for the hyperlink than the hyperlink itself (I've wanted to use that as well before) –  fretje Jul 4 '09 at 11:44
@fretje: I appreciate the defense, but I was thinking for some reason that links were text-only in the comments. I'm honestly not sure how I managed to miss that all this time... –  Jared Harley Jul 5 '09 at 14:05
add comment

You must log in to answer this question.

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