Fix URL handling in the whole markdown module, improve test coverage (#1027)

Amended with string to bool change in API SDK.

Signed-off-by: Andrew Boyarshin <andrew.boyarshin@gmail.com>
This commit is contained in:
Andrew Boyarshin 2017-02-24 21:59:56 +07:00 committed by Lunny Xiao
parent 12e71e5706
commit 0602a44b27
6 changed files with 273 additions and 152 deletions

View file

@ -150,7 +150,7 @@ func composeTplData(subject, body, link string) map[string]interface{} {
func composeIssueMessage(issue *Issue, doer *User, tplName base.TplName, tos []string, info string) *mailer.Message {
subject := issue.mailSubject()
body := string(markdown.RenderSpecialLink([]byte(issue.Content), issue.Repo.HTMLURL(), issue.Repo.ComposeMetas()))
body := string(markdown.RenderString(issue.Content, issue.Repo.HTMLURL(), issue.Repo.ComposeMetas()))
data := composeTplData(subject, body, issue.HTMLURL())
data["Doer"] = doer