How to add a newline in Markdown

or how to avoid having to use double spaces.

26 Mar 2023

I have been writing all my notes in Markdown, in VS Code VS Code , for the best part of a year now.

Notes are used to generate this site, using the Pelican static site generator library in Python Building a static site with Pelican which itself uses the Python-Markdown library Python library: Python-Markdown.

Standard Markdown implementation dictates that newlines are created by using two spaces at the end of a line.

In VS Code, just going to a new line shows as just that.. a new line.

But when generating the site, the newlines are not there, if no double space has been used.

This has been the only real gripe so far for me.

Today, I found out that configuration extensions exist for Python-Markdown, which can be used to add newlines without double-spaces. 😁

See the "New-Line-to-Break Extension" in Python library: Python-Markdown

links

social