pkg/mailer/mail: render markdown in issue related emails (#5629)

Reference #4552
pull/5631/head
Andy Hochhaus 2019-02-20 16:54:27 -06:00 committed by 无闻
parent 2c3e2b701e
commit 9ebd62f676
1 changed files with 1 additions and 1 deletions

View File

@ -173,7 +173,7 @@ func composeTplData(subject, body, link string) map[string]interface{} {
func composeIssueMessage(issue Issue, repo Repository, doer User, tplName string, tos []string, info string) *Message { func composeIssueMessage(issue Issue, repo Repository, doer User, tplName string, tos []string, info string) *Message {
subject := issue.MailSubject() subject := issue.MailSubject()
body := string(markup.RenderSpecialLink([]byte(issue.Content()), repo.HTMLURL(), repo.ComposeMetas())) body := string(markup.Markdown([]byte(issue.Content()), repo.HTMLURL(), repo.ComposeMetas()))
data := composeTplData(subject, body, issue.HTMLURL()) data := composeTplData(subject, body, issue.HTMLURL())
data["Doer"] = doer data["Doer"] = doer
content, err := mailRender.HTMLString(tplName, data) content, err := mailRender.HTMLString(tplName, data)