89

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.

35
  • 1
    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, 2009 at 14:54
  • 21
    Bad comments will always be possible - just flag them rather than trying to work out complex rules to prohibit them.
    – Jon Skeet
    Jun 28, 2009 at 15:02
  • 3
    Or 600 characters or 10 lines, whichever comes first. Jun 28, 2009 at 19:42
  • 7
    it is unlikely we will provide newlines, but see below that bold and italic and code __sample__ now work. Jul 3, 2009 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, 2009 at 15:14
  • 3
    @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, 2009 at 15:38
  • 3
    "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, 2009 at 20:30
  • 3
    Some people like to type things using separate lines.\n They do this for effect.
    – bobobobo
    Sep 5, 2010 at 0:01
  • 8
    I'd pay for newlines. Mar 1, 2011 at 16:34
  • 3
    +1 for wanting newlines. @Jeff - it sounds like you've all made up your minds to never allow newlines - why, if people want them? Mar 30, 2011 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, 2011 at 15:41
  • 1
    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, 2013 at 2:24
  • 1
    I certainly don't want to read whole pages of uglily formatted and overly long comments just because every user not used to proper paragraphing finds it a good idea to make a linebreak after each 3 word sentence. Have you ever realized how many people write questions with manual linebreaks (not paragraph breaks)? I just don't want those guys to write such comments. The very few valid examples just don't pay enough for the abuse, given that you shouldn't normally need a manual linebreak in a 6 line paragraph. Rather than that I would rather like to be able to properly style a function name. Aug 18, 2014 at 11:26
  • 1
    But ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ they are already possible May 9, 2017 at 3:12
  • 1
    @bobobobo soft hypens
    – BenV
    Nov 11, 2019 at 22:57

5 Answers 5

73

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 :)

6
  • 6
    You could always add the replies one at a time.
    – ChrisF Mod
    Jun 28, 2009 at 17:31
  • 21
    @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, 2009 at 17:52
  • 1
    I have the same problem as Jon. --- @Jeff: Please, decrease the threshold to 15 seconds at least.
    – Masi
    Jul 5, 2009 at 15:16
  • pubic static void main(string[] args) bold and an italic
    – Chris S
    Jul 15, 2009 at 13:50
  • 13
    You anyways cannot @-ping multiple users in one message. Sure you can include the @-sign, but the users will not get pinged.
    – yo'
    Feb 19, 2015 at 10:02
  • 1
    A decade later, it still seems to be the case? I cannot enter new lines in code, worse than limiting the time within which I have to edit it :(
    – kisna
    Mar 23, 2016 at 3:03
28

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.

2
  • 2
    +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, 2010 at 14:03
  • @Benjol, You are confusing the message with the messenger.
    – Pacerier
    Apr 5, 2015 at 11:19
12

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 Stack Exchange model. Maybe the administrators, with concrete evidence that it doesn't cause problems, will change their minds on this issue.

4

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

3
  • 3
    Links should automatically be a-href'd: stackoverflow.com
    – dbr
    Jun 28, 2009 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, 2009 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... Jul 5, 2009 at 14:05
2

The maximum length of comments should be reduced to 200 characters, or line breaks should be allowed in comments

2
  • 3
    I really don't agree that a 600-character comment limit is reasonable. It seems to me that is an upper limit a user is never expected to reach. "640k ought to be enough for anybody". But people regularly and routinely bump into this limit, thinking "oh, 346 characters left until my comment is complete." So they keep typing and typing and typing, and Jakob Neilson rings their phone but they are too busy typing their comment. Blocks of concreted text plaster the walls of stackoverflow. Nothing is done. Moderators don't want to remove comments with nuggets of wisdom planted in foliage of words.
    – bobobobo
    Nov 11, 2019 at 1:05
  • 2
    I didn't think much of the answer but the comment's really good so I upvoted that. It also made me smile. :) Nov 12, 2019 at 7:40

You must log in to answer this question.

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