1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Make markdown as an independent module

This commit is contained in:
Unknwon
2016-02-20 17:10:05 -05:00
parent d8a994ef24
commit d5a3021a7d
14 changed files with 157 additions and 143 deletions

View File

@@ -9,6 +9,7 @@ import (
"github.com/gogits/gogs/modules/auth"
"github.com/gogits/gogs/modules/base"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/markdown"
"github.com/gogits/gogs/modules/middleware"
)
@@ -73,7 +74,7 @@ func Releases(ctx *middleware.Context) {
rel.NumCommitsBehind = ctx.Repo.CommitsCount - rel.NumCommits
}
rel.Note = base.RenderMarkdownString(rel.Note, ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas())
rel.Note = markdown.RenderString(rel.Note, ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas())
tags[i] = rel
rels[j] = nil // Mark as used.
break
@@ -137,7 +138,7 @@ func Releases(ctx *middleware.Context) {
rel.NumCommitsBehind = ctx.Repo.CommitsCount - rel.NumCommits
}
rel.Note = base.RenderMarkdownString(rel.Note, ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas())
rel.Note = markdown.RenderString(rel.Note, ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas())
tags = append(tags, rel)
}
models.SortReleases(tags)