DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far...

Welcome! This is a Q&A website for computer programmers and users alike, focused on helping fellow programmers and users. Read more

What are you stuck on? Ask a question and hopefully somebody will be able to help you out!
+2 votes

For as long as I can remember, just out of habit, I've ended lines from paragraphs in markdown with a double-space. But recently I've noticed some WYSIWYGs and even some people do not always do this. I don't even remember where I picked up the habit anymore.

Just to throw it out there, I only end sentences when I write prose with a single space.

Does this sound familiar to anyone? Did I pick it up from some legacy version of the format? Has it been replaced? Or did I get it accidentally from copying someone who ends their sentences with two spaces after the punctuation?


1 Answer

+1 vote

Both the official Markdown syntax description and the CommonMark Markdown spec state that a double space before a newline makes it a hard line break (HTML <br />), as opposed to a soft line break.

Both are valid elements of Markdown, so it wouldn't be crazy for a WYSIWYG editor to not force the user to use one or the other.

Also, it always depends on the Markdown renderer. It's not uncommon for different renderers to not follow the original description nor the spec and do whatever they want. So, depending on the target renderer the Markdown is being written for or the editor was made for, it may differ in style of line breaks, among other things.

Contributions licensed under CC0