From 90a6553c37d16a536a24ae26fa9ef5ee4eafaf99 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 1 Sep 2015 08:32:02 -0400 Subject: #1009 Config option for preserving hard line breaks --- modules/base/markdown.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules/base') diff --git a/modules/base/markdown.go b/modules/base/markdown.go index 03f1287c1d..540ee58f47 100644 --- a/modules/base/markdown.go +++ b/modules/base/markdown.go @@ -201,6 +201,10 @@ func RenderRawMarkdown(body []byte, urlPrefix string) []byte { extensions |= blackfriday.EXTENSION_SPACE_HEADERS extensions |= blackfriday.EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK + if setting.Markdown.EnableHardLineBreak { + extensions |= blackfriday.EXTENSION_HARD_LINE_BREAK + } + body = blackfriday.Markdown(body, renderer, extensions) return body } -- cgit v1.2.3