Do Not Eclose Markdown Content Into p Tag

14 July 2019 |

If you are using for example Gatsby like I do, don’t enlose html from markdown into <p> tag. The content of <p> will be missing in some cases. Anyway<p> should not include any block elements such as <p>.

Instead of:

<p className="article-post" dangerouslySetInnerHTML= />

use:

<div className="article-post" dangerouslySetInnerHTML= />