diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2017-09-17 01:17:57 +0800 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-09-16 20:17:57 +0300 |
commit | 52e11b24bf5e395d83ea58c1b0fd6922efe16add (patch) | |
tree | f00c9da35c1f2afc3446b8607217e4d4315959ec /models/mail.go | |
parent | 911ca0215377b34559f2304a22dce863e219b255 (diff) | |
download | gitea-52e11b24bf5e395d83ea58c1b0fd6922efe16add.tar.gz gitea-52e11b24bf5e395d83ea58c1b0fd6922efe16add.zip |
Restructure markup & markdown to prepare for multiple markup languageā¦ (#2411)
* restructure markup & markdown to prepare for multiple markup languages support
* adjust some functions between markdown and markup
* fix tests
* improve the comments
Diffstat (limited to 'models/mail.go')
-rw-r--r-- | models/mail.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/models/mail.go b/models/mail.go index 41fddad2b4..b7d24a06a1 100644 --- a/models/mail.go +++ b/models/mail.go @@ -14,6 +14,7 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/mailer" "code.gitea.io/gitea/modules/markdown" + "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/setting" "gopkg.in/gomail.v2" "gopkg.in/macaron.v1" @@ -150,7 +151,7 @@ func composeTplData(subject, body, link string) map[string]interface{} { func composeIssueCommentMessage(issue *Issue, doer *User, comment *Comment, tplName base.TplName, tos []string, info string) *mailer.Message { subject := issue.mailSubject() - body := string(markdown.RenderString(issue.Content, issue.Repo.HTMLURL(), issue.Repo.ComposeMetas())) + body := string(markup.RenderByType(markdown.MarkupName, []byte(issue.Content), issue.Repo.HTMLURL(), issue.Repo.ComposeMetas())) data := make(map[string]interface{}, 10) if comment != nil { |