Ahhh yeah, that’s one of those weird-but-spec-compliant things in Markdown. Here's the deal:
In standard Markdown, a single line break (pressing
Enter
once) is treated as a space — not a new
paragraph or a visible line break. It’s considered part of the same
paragraph.
This is one line This looks like a second
Will render as:
This is one line This looks like a second
Unless you...
Classic Markdown line break:
This is one line␣␣ This is the next (with a break)
➡️ The ␣␣
(2 spaces) tells Markdown to insert a
<br>
tag.
<br>
TagIf you’re writing content where you need fine control:
<br>
This is one line This is another
Pandoc respects raw HTML tags in Markdown.
GFM handles single line breaks like hard breaks:
pandoc input.md -f gfm -t html -o output.html
pandoc -f gfm -t html -s input.md -o output.html
␣␣
at end of line or -f gfm
for more
intuitive behavior<br>
and move on 😎