12

Possible Duplicate:
How do comments work?
Stack Overflow comments don’t have formatting tags or line breaks?

I've been struggling for some time with adding line breaks to comments on SO. I tried adding a double line break in the comment editor, as one would do in a question, but that didn't work. After reading the comment help, I tried adding two spaces after each line; still, to no avail. Am I doing something wrong here?

I'm including a comment with an attempted line break.

asked Jan 27, 2013 at 21:46
6
  • 1
    Here's one line Here's another Commented Jan 27, 2013 at 21:46
  • 1
    And of course: meta.stackexchange.com/questions/19756/how-do-comments-work/… Commented Jan 27, 2013 at 21:54
  • Previously, it was possible to insert linebreaks in comment editor, but they don't appear as such after submitting. Related: meta.stackexchange.com/questions/63644/… Right now, you've to use shift+enter for that (to separate your thoughts and so on). Commented Jan 27, 2013 at 22:00
  • I already use Shift+Return to add a line break in the comment editor, but it disappears without a trace when the comment is published. Commented Jan 27, 2013 at 22:18
  • "but it disappears without a trace when the comment is published." That is a good thing. Trust me on this. On a few sites there is a way to force the matter and it is hellishly distracting. Comments are supposed to be wimpy little things without much expressiveness. Commented Jan 27, 2013 at 23:45
  • Blah, blah, blah. Commented Mar 2, 2019 at 16:08

1 Answer 1

12

You can't add line breaks in comments, stop trying.

After reading the comment help, I tried adding two spaces after each line; still, to no avail

There is nothing in the comments help saying it's possible.

Comment formatting

Comments support only bold, italic, code and links; in addition, a few shorthand links are available.

answered Jan 27, 2013 at 21:51
17
  • 5
    This page begs to differ. Not to mention, I see comments around SO with line breaks all the time. Commented Jan 27, 2013 at 22:17
  • 2
    @JulesMazur, that page is for Q&A, not for comments, as they have a limited markup available. Regarding the examples, show me one...! Commented Jan 27, 2013 at 22:18
  • I've looked through some questions, and I'm no longer able to find any examples. But then, why write that a line break can be added by using two whitespaces on the page I liked to? Commented Jan 27, 2013 at 22:23
  • 1
    @JulesMazur, Are you just asking? read the answers you get! Commented Jan 27, 2013 at 22:28
  • @JulesMazur - it does add a line-break, in a post. Line breaks don't work in comments, never have...they could get obnoxiously, vertically tall if we did allow it. It's been discussed here on meta many times, and every time overwhelmingly shot down. Commented Jan 27, 2013 at 22:29
  • @NickCraver, Actually I think it was supported once, wasn't it? you could add markup to comments, or am I wrong? Commented Jan 27, 2013 at 22:30
  • 1
    @gdoron - AFAIK it was never supported, that's not to say it wasn't possible at one point Commented Jan 27, 2013 at 22:32
  • @NickCraver maybe if you do the something like either ( up to 600 characters in comment OR up 5/6 lines of with any number of characters). By doing this you still restrict the number of lines but give users more formatting power Commented Apr 12, 2016 at 16:58
  • @asma22 There are many ways to exploit that, and you still have to consider the many-comments case where we have dozens in a section. I just can't see us supporting this. It also would produce unexpected behavior on existing mobile and API clients that have always known this to not work. Commented Apr 12, 2016 at 17:00
  • 1
    There are currently dozens of comments on a post, and many get folded. Your folding feature would still be effective on these. The pros of formatting outweigh the cons of a few. As for issues with mobile. I don't think that's a really good excuse, SO can kindly improve it's design or completely separate its mobile version from non-mobile clients. Commented Apr 12, 2016 at 17:07
  • @asma22 the mobile clients are applications we don't have direct control over. Commented Apr 12, 2016 at 18:59
  • I ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­ ­­ ­ ­ ­ ­ ­ tried, but I just couldn't find any workarounds. Commented May 26, 2017 at 21:26
  • 3
    There's definitely no good way... Commented Mar 2, 2019 at 16:05
  • Has this really not been fixed after six years?? Commented Apr 9, 2019 at 23:35
  • 1
    @flarn2006 This is not a bug, its by design. I hate it, but its what it is. Commented Aug 14, 2019 at 22:38

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.