summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-04-07 14:24:58 -0400
committerUnknown <joe2010xtmf@163.com>2014-04-07 14:24:58 -0400
commit22feddf804c7fbf3418cbbc8e7302da271da4e5a (patch)
treec5f8fac19903327e78d5ac4f0fa2f8004a10974d /modules
parent7776f407b6cf7e4897377b73ef6235ecfd9f2a53 (diff)
downloadgitea-22feddf804c7fbf3418cbbc8e7302da271da4e5a.tar.gz
gitea-22feddf804c7fbf3418cbbc8e7302da271da4e5a.zip
Fix #66
Diffstat (limited to 'modules')
-rw-r--r--modules/base/markdown.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/base/markdown.go b/modules/base/markdown.go
index ce1e2f5bec..1893ccee6e 100644
--- a/modules/base/markdown.go
+++ b/modules/base/markdown.go
@@ -133,8 +133,8 @@ func RenderSpecialLink(rawBytes []byte, urlPrefix string) []byte {
}
func RenderMarkdown(rawBytes []byte, urlPrefix string) []byte {
- body := RenderSpecialLink(rawBytes, urlPrefix)
- fmt.Println(string(body))
+ // body := RenderSpecialLink(rawBytes, urlPrefix)
+ // fmt.Println(string(body))
htmlFlags := 0
// htmlFlags |= gfm.HTML_USE_XHTML
// htmlFlags |= gfm.HTML_USE_SMARTYPANTS
@@ -146,10 +146,10 @@ func RenderMarkdown(rawBytes []byte, urlPrefix string) []byte {
htmlFlags |= gfm.HTML_GITHUB_BLOCKCODE
htmlFlags |= gfm.HTML_OMIT_CONTENTS
// htmlFlags |= gfm.HTML_COMPLETE_PAGE
- // renderer := &CustomRender{
- // Renderer: gfm.HtmlRenderer(htmlFlags, "", ""),
- // urlPrefix: urlPrefix,
- // }
+ renderer := &CustomRender{
+ Renderer: gfm.HtmlRenderer(htmlFlags, "", ""),
+ urlPrefix: urlPrefix,
+ }
// set up the parser
extensions := 0
@@ -162,7 +162,7 @@ func RenderMarkdown(rawBytes []byte, urlPrefix string) []byte {
extensions |= gfm.EXTENSION_SPACE_HEADERS
extensions |= gfm.EXTENSION_NO_EMPTY_LINE_BEFORE_BLOCK
- // body = gfm.Markdown(body, renderer, extensions)
+ body := gfm.Markdown(rawBytes, renderer, extensions)
// fmt.Println(string(body))
return body
}