Question: `Jekyll 3.0.1` is not rendering a single line feed (line break). It ignores it. Surprisingly it is rending double line feed as it is. I am using `Jekyll` on `Ubuntu 16.04`. Can someone help me to tackle this behaviour ?

Input
-----

[![enter image description here](https://i.stack.imgur.com/QiQWu.png)](https://i.stack.imgur.com/QiQWu.png)

Rendered
--------

[![enter image description here](https://i.stack.imgur.com/nLRnJ.png)](https://i.stack.imgur.com/nLRnJ.png)

Answer: 
Good question. There are (as always) multiple ways to do this. Each solutions has its pros and cons. Choose the one that fits your style or project best.

---

**Solution 1: newline to br**

This is by far the most elegant solution. It works just like PHP. You can write:

```
<div id="content">{{ content | newline_to_br }}</div>

```

And add this CSS:

```
#content br {display: none;}
#content p br {display: inline;}

```

It pollutes your output a little (with unrendered breaks outside of the paragraph tags), but it does exactly what you want. It is easy to read and does not require any changes to your content/markdown.

---

**Solution 2: two spaces after each line**

Two spaces at the end of a line are being replaced by a `<br>` in the output. I do not like that these spaces are very hard to see in a code editor, but this is the true markdown way. [Source](https://daringfireball.net/projects/markdown/syntax#p)

---

**Solution 3: manually adding HTML breaks**

As HTML is allowed in markdown, you can manually write HTML breaks, like this: `<br>`. These breaks are cumbersome to write and they pollute your markdown with HTML, but they work.
Are you looking for [this](https://daringfireball.net/projects/markdown/syntax#p)?

> 
> When you *do* want to insert a `<br />` break tag using Markdown, you end a line with two or more spaces, then type return.
> 
> 
> 

This source

```
This line ends with two spaces  
And this follows immediately

```

should render to

This line ends with two spaces  

And this follows immediately