My writing process often begins with Markdown, a simple syntax for publication on the web.

I love Markdown, but one thing has always bugged me. It’s a quirk of Markdown that simple line breaks are ignored, so that multi-line text in the source document becomes one long paragraph in the rendered html output. In other words, simply pressing Enter doesn’t result in a <br /> linebreak. Here’s what I mean. You can see the difference between the original Markdown text and the output rendered in html:

Auto-generated description: A text editor window displays a discussion about line breaks and formatting styles, highlighting some sentences and Markdown usage.

This is a sentence. Now I’ve started a new line, but I simply pressed ‘enter’. Look, I did it again. In the Markdown original, this shows up as separate sentences. But in the processed html it’s all one long paragraph. Yes, one long paragraph, which you’re reading right now. So is this a bug or a feature? Is it a feature or a bug? I added two spaces to the previous line to start a new paragraph.

A blank line has a more pronounced effect.

I’ve previously found this behaviour a bit annoying, but today I learned about semantic line breaks via sembr.org and it has completely changed the way I see line breaks working.

From now on I’ll just write every sentence on its own line, and then choose where I want the paragraphs to break, simply by ending the line with two spaces.

What’s the benefit?

This way I get to clarify my thoughts by limiting each sentence or clause to a single vertical line, while Markdown makes the paragraph formatting prettier for my readers.

As the semantic line break specification suggests,

By inserting line breaks at semantic boundaries, writers, editors, and other collaborators can make source text easier to work with, without affecting how it’s seen by readers.

I’m not sure the creators of Markdown intended this1, but it’s how it works, and I can now take advantage of it. It used to bug me, but from now on it’s a feature.

This is an example of something simple that might be obvious to you, but which I didn’t understand till now. Do you have any other examples of similar obvious things that others may have overlooked? Or things you have overlooked that others find obvious? If so,I’d love to hear about them.

A keyboard is depicted with papers flying out from it in a dynamic, illustrated style.

  1. the spec just says: “Yes, this takes a tad more effort to create a <br />, but a simplistic “every line break is a <br />” rule wouldn’t work for Markdown. " ↩︎