diff options
author | Unknwon <u@gogs.io> | 2015-09-01 08:32:02 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-09-01 08:32:02 -0400 |
commit | 90a6553c37d16a536a24ae26fa9ef5ee4eafaf99 (patch) | |
tree | 2ad0757e9dfaf9e697ab88a6c5950721ab387b97 /modules/base | |
parent | 50dbc2732bd77bccfaf9ca25bf0bfa336555fe8c (diff) | |
download | gitea-90a6553c37d16a536a24ae26fa9ef5ee4eafaf99.tar.gz gitea-90a6553c37d16a536a24ae26fa9ef5ee4eafaf99.zip |
#1009 Config option for preserving hard line breaks
Diffstat (limited to 'modules/base')
-rw-r--r-- | modules/base/markdown.go | 4 |
1 files changed, 4 insertions, 0 deletions
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 } |