2

I expect the following quote to have 2 lines:

> line1
> line2

But it actually renders as a single line:

line1 line2

I assume this to be a bug since it defeats all my expectations of quoting behavior.

If it is not a bug, how do I get this to behave correctly?

5
  • 5
    Two spaces after line1.
    – Ivar
    Commented Dec 10, 2021 at 14:22
  • Do you have a link to relevant documentation? This does not mention it: meta.stackoverflow.com/editing-help
    – Domi
    Commented Dec 10, 2021 at 14:24
  • 2
    It's here. (It is not about quotes specifically, but about line breaks in general.)
    – Ivar
    Commented Dec 10, 2021 at 14:25
  • 1
    Would it be a terrible idea to re-phrase this question from what it is now to a discussion on whether blockquotes should not have automatic line breaks? Or, to cut it short, why don't you post an answer and i'll accept it? (I personally don't think, this behavior is all that self-explanatory, and I have been struggling with this for... a long time before actually asking and learning how this work correctly)
    – Domi
    Commented Dec 10, 2021 at 14:27
  • 1
    Better use a trailing "\" (supported now) to not be dependent on significant trailing white space. Commented Dec 11, 2021 at 14:50

1 Answer 1

13

The rules regarding line breaks in quotes is the same as outside of quotes. If you want to have a single newline, you need to either add two spaces after the preceding line, or add a <br>. This is explained in the Markdown help page under "Linebreaks".

(As far as I'm aware, this is part of Markdown itself, not necessarily Stack Overflow's implementation of it.)

1

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