diff options
Diffstat (limited to 'modules/base/markdown.go')
-rw-r--r-- | modules/base/markdown.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/modules/base/markdown.go b/modules/base/markdown.go index 95b4b212fd..057e1b0477 100644 --- a/modules/base/markdown.go +++ b/modules/base/markdown.go @@ -132,9 +132,7 @@ func RenderSpecialLink(rawBytes []byte, urlPrefix string) []byte { return rawBytes } -func RenderMarkdown(rawBytes []byte, urlPrefix string) []byte { - body := RenderSpecialLink(rawBytes, urlPrefix) - // fmt.Println(string(body)) +func RenderRawMarkdown(body []byte, urlPrefix string) []byte { htmlFlags := 0 // htmlFlags |= gfm.HTML_USE_XHTML // htmlFlags |= gfm.HTML_USE_SMARTYPANTS @@ -163,7 +161,12 @@ func RenderMarkdown(rawBytes []byte, urlPrefix string) []byte { extensions |= gfm.EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK body = gfm.Markdown(body, renderer, extensions) - // fmt.Println(string(body)) + return body +} + +func RenderMarkdown(rawBytes []byte, urlPrefix string) []byte { + body := RenderSpecialLink(rawBytes, urlPrefix) + body = RenderRawMarkdown(body, urlPrefix) return body } |