2

At least in the editor preview, this doesn't render linebreaks:

> foo > bar > baz 

foo bar baz

Screenshot:

Is this a problem of my browser? Or something else? On StackEdit it works as expected!

2
  • 2
    There's nothing special about these lines being in blockquotes. The same thing would happen if the lines were not in blockquotes. This is just one of the ways that Markdown works. A single linebreak in the source text is considered an extension of the previous line, unless there's formatting that indicates that it's not a continuation (i.e., continuing the previous line is the default). Commented Sep 23, 2024 at 0:26
  • Ah, thank you! It was just confusing that StackEdit behaves differently, so StackEdit apparently is not pure MD. Commented Sep 23, 2024 at 9:33

2 Answers 2

8

The Linebreaks section of the Markdown help says:

End a line with two spaces to add a <br/> linebreak

> baz > bar 

Which renders as:

baz
bar

0
6

This works as expected.

If you require explicit line breaks, use backslashes at the end of the line:

> foo \ > bar \ > baz 

foo
bar
baz

Personally, I consider this preferable to ending lines with two spaces (as in the other answer), as the latter can be easily overlooked.

3
  • 2
    Agree that using backslashes is less likely to be overlooked. Do you know if there is a way to request the Linebreaks section of the Markdown help is updated to mention the option of a trailing backslash? Commented Mar 30 at 10:45
  • @ChesterGillon No idea. Commented Mar 30 at 10:45
  • This, indeed, looks preferable to two spaces. But it is a strange choice of markup, given that usually (in all kinds of script languages), trailing backslashes have the exactly opposite meaning. Commented Mar 30 at 19:38

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.