When I post a question and want to add a new line, I have to press Return two times, or else the next text will appear on the same line.
Is this really supposed to behave this way? If so, why?
This is real, and there's a reason for this. It's two-fold, actually.
First, there is a huge difference between a line break and a paragraph break. A line break is just that: The reading flow continues on the next line; your eyes automatically jump from the end of the previous line to the beginning of the next.
So the purpose of a line break is to not be seen.
A paragraph break, on the other hand, gives your eyes room to breathe, so to speak. Paragraphs are used to break up text into smaller blocks so that reading happens more rhythmically and not inonegiantwalloflettersthatneverseemstostopohmycanitendalreadyineedtotakeabreak.
How exactly a paragraph break is presented often depends on the country and/or the language. Usually it's one of two ways: Either there is a bit of white space between the paragraphs (as it is done on Stack Overflow), or the first line of a paragraph is indented.
That's this way. Of course you can also combine both ways. Either way, there is a visual break between the two paragraphs, so the reader automatically takes a breath at the point.
When people press Return in MS Word or OpenOffice Writer, they often expect this to create a line break (or "newline"). But the fact that writing continues on the next line after pressing that key is just a side effect of a paragraph break.
If your first-line indent or the pre- or post-space is non-zero in the paragraph settings, you'll notice that a lot more happens than just a newline. (Microsoft changed their Office defaults, so beginning with Office 2007, a paragraph break in Word actually does look different than a line break. This tends to confuse a lot of people who don't make this distinction.)
Especially when writing text, it is very rare to insert a manual line break; most of the time, you'll leave it to your word processor to jump to the next line when there's no more space left on this one.
Here's one of the rare examples where you actually want to insert a line break, but not a paragraph break:
When the woman asked him to help her with carrying her many bags, he took a nap
sack from the luggage compartment. As a Gentleman, he wouldn't say no to a lady.
(the key to insert a line break in Word and in OOo is <Shift>-Return
, by the way.)
Okay, what was your question again? Ah, yes. Markdown was created to be written in a way similar to the way plain text emails are written: Dashes as underlines, words in *stars* to denote emphasis, etc.
To denote paragraph breaks in emails, you would usually use the white-space variant, not the indentation variant; especially since it often happens that space characters are stripped, which could lead to you losing your paragraph breaks (and thus readability).
But since in plain text emails there is no way to insert a nice automatic .7em post-paragraph spacing, the standard way to separate paragraphs is inserting an empty line. And so this practice was carried over to Markdown.
The second reason is that you can't be sure about the screen width the recipient of your email. If your email is wrapped to 79 characters per line, but it is read at 70 characters per line, you either have alternating long line – short line – long line – short line etc., which isn't really fun to read; or your email program rewraps the lines by [there it is:] ignoring single line breaks.
As to the question why a real line break in markdown is created with two trailing spaces – I don't know. Maybe because it's the opposite of a two-character indent, so it's a "non-paragraph break".
Whatever the reason: Remember that in normal text flow, you usually don't want to insert a line break, you want to insert a paragraph break. This is even more true when your text ends up as HTML, so you can't tell anyway how it's going to render on the reader's screen.
<p>
paragraph. Only when really needed, end a line with two spaces to add a <br/>
linebreak.
It's part of the Markdown spec. If you really want just a line break, you can put two spaces at the end of the line or use an html line break (<br>
).
<br>
(inserted when using two spaces) is not the same as a <p>
(resulting from a blank line). So, "really" should read: really, in very rare occasions :-) Respect the layout of the website, which happens to have some whitespace defined around paragraphs.
And as for the why: because while editing in plain text it looks much better. This new paragraph is clearly separated from the previous one.
And as for the why: because while editing in plain text it looks much better. This new paragraph is not so clearly separated from the previous one.
As others have mentioned, it's a Markdown oddity. Hopefully someone will come along some day and fix it. It's not very user friendly the way it is.
return
they want a return
, either a paragraph end or an internal paragraph line break. Anyway this return is fully wanted. A nice interface, an interface which purpose is to be as near as possible of WYSIWIG, an interface which purpose is to help the one taking care, should make a return
when one type one. From my point of vue, there wouldn't be any simpler and more efficient interface.
<br>
is not the same as the<p>
that is inserted when using a blank line): Should the markdown renderer treat a single line break as <br>?