|
|
|
@ -15,6 +15,9 @@ import (
|
|
|
|
|
"code.gitea.io/gitea/modules/setting" |
|
|
|
|
"code.gitea.io/gitea/modules/structs" |
|
|
|
|
"code.gitea.io/gitea/modules/util" |
|
|
|
|
"code.gitea.io/gitea/modules/markup" |
|
|
|
|
"code.gitea.io/gitea/modules/markup/markdown" |
|
|
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
const ( |
|
|
|
@ -76,6 +79,22 @@ func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions,
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
for i := range users { |
|
|
|
|
if len(users[i].Description) != 0 { |
|
|
|
|
content, err := markdown.RenderString(&markup.RenderContext{ |
|
|
|
|
URLPrefix: ctx.Repo.RepoLink, |
|
|
|
|
Metas: map[string]string{"mode": "document"}, |
|
|
|
|
GitRepo: ctx.Repo.GitRepo, |
|
|
|
|
Ctx: ctx, |
|
|
|
|
}, users[i].Description) |
|
|
|
|
if err != nil { |
|
|
|
|
ctx.ServerError("RenderString", err) |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|
users[i].Description = content |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ctx.Data["Keyword"] = opts.Keyword |
|
|
|
|
ctx.Data["Total"] = count |
|
|
|
|
ctx.Data["Users"] = users |
|
|
|
|