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

Reference #4552
This commit is contained in:
Andy Hochhaus 2019-02-20 16:54:27 -06:00 committed by 无闻
parent 2c3e2b701e
commit 9ebd62f676

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 {
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["Doer"] = doer
content, err := mailRender.HTMLString(tplName, data)