Refactor markup render system (#32589)
This PR mainly moves some code and introduces `RenderContext.WithXxx` functions
This commit is contained in:
parent
81ac8d914c
commit
c4e27cb27b
49 changed files with 486 additions and 626 deletions
|
@ -259,9 +259,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
|
|||
|
||||
ctx.Data["IsFollowing"] = ctx.Doer != nil && user_model.IsFollowing(ctx, ctx.Doer.ID, ctx.ContextUser.ID)
|
||||
if len(ctx.ContextUser.Description) != 0 {
|
||||
content, err := markdown.RenderString(&markup.RenderContext{
|
||||
Ctx: ctx,
|
||||
}, ctx.ContextUser.Description)
|
||||
content, err := markdown.RenderString(markup.NewRenderContext(ctx), ctx.ContextUser.Description)
|
||||
if err != nil {
|
||||
ctx.ServerError("RenderString", err)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue