Answers.Body: <p>I was able to get good results using <code>{{ block.myFieldName|nl2br|markdown }}</code></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-11T22:23:44.447Z
Answers.LastActivityDate: 2017-08-11T22:23:44.447Z
Answers.UserDisplayName: SoHo
Answers.Body: <p>There is a Craft <a href="https://github.com/pixelandtonic/Parsedown" rel="nofollow noreferrer">Parsedown</a> plugin for Craft which supports Github Flavored Markdown you can use.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-21T17:27:44.757Z
Answers.LastActivityDate: 2017-07-21T17:27:44.757Z
Answers.UserDisplayName: Brad Bell
Body: <p>In particular, I'm trying to render the text in markdown preserving the original line breaks, like in the GitHub Flavored Markdown specifications.</p>
  
  <p>Using <code>{{ something | md }}</code> in a template the output contains a line break only if a line ends with two spaces, like in the original markdown implementation.</p>
  
  <p>Some markdown processors (ie Blackfriday, written in Go) call this feature "hardLineBreak".</p>
  
Tags: <markdown>
Title: Render markdown as GFM (GitHub Flavored Markdown), therefore preserving line breaks?
ThreadText: # Render markdown as GFM (GitHub Flavored Markdown), therefore preserving line breaks?
  
  (Asked by: username_0 on 2017-07-21)
  
  In particular, I'm trying to render the text in markdown preserving the original line breaks, like in the GitHub Flavored Markdown specifications.
  
  Using `{{ something | md }}` in a template the output contains a line break only if a line ends with two spaces, like in the original markdown implementation.
  
  Some markdown processors (ie Blackfriday, written in Go) call this feature "hardLineBreak".
  
  **Tags:** markdown
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-08-11. Score: 2 | Accepted answer
  
  I was able to get good results using `{{ block.myFieldName|nl2br|markdown }}`
  
  
  ---
  
  ### Answer by username_2 on 2017-07-21. Score: 1
  
  There is a Craft [Parsedown](https://github.com/pixelandtonic/Parsedown) plugin for Craft which supports Github Flavored Markdown you can use.
  
  
  ---
  
  