mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
@@ -71,6 +71,7 @@ func renderMarkdown(ctx *context.Context, act *activities_model.Action, content
|
||||
|
||||
// feedActionsToFeedItems convert gitea's Action feed to feeds Item
|
||||
func feedActionsToFeedItems(ctx *context.Context, actions activities_model.ActionList) (items []*feeds.Item, err error) {
|
||||
renderUtils := templates.NewRenderUtils(ctx)
|
||||
for _, act := range actions {
|
||||
act.LoadActUser(ctx)
|
||||
|
||||
@@ -215,7 +216,7 @@ func feedActionsToFeedItems(ctx *context.Context, actions activities_model.Actio
|
||||
desc += fmt.Sprintf("<a href=\"%s\">%s</a>\n%s",
|
||||
html.EscapeString(fmt.Sprintf("%s/commit/%s", act.GetRepoAbsoluteLink(ctx), commit.Sha1)),
|
||||
commit.Sha1,
|
||||
templates.RenderCommitMessage(ctx, commit.Message, nil),
|
||||
renderUtils.RenderCommitMessage(commit.Message, nil),
|
||||
)
|
||||
}
|
||||
|
||||
|
@@ -103,9 +103,9 @@ func Projects(ctx *context.Context) {
|
||||
} else {
|
||||
ctx.Data["State"] = "open"
|
||||
}
|
||||
|
||||
renderUtils := templates.NewRenderUtils(ctx)
|
||||
for _, project := range projects {
|
||||
project.RenderedContent = templates.RenderMarkdownToHtml(ctx, project.Description)
|
||||
project.RenderedContent = renderUtils.MarkdownToHtml(project.Description)
|
||||
}
|
||||
|
||||
err = shared_user.LoadHeaderCount(ctx)
|
||||
@@ -435,7 +435,7 @@ func ViewProject(ctx *context.Context) {
|
||||
ctx.Data["SelectLabels"] = selectLabels
|
||||
ctx.Data["AssigneeID"] = assigneeID
|
||||
|
||||
project.RenderedContent = templates.RenderMarkdownToHtml(ctx, project.Description)
|
||||
project.RenderedContent = templates.NewRenderUtils(ctx).MarkdownToHtml(project.Description)
|
||||
ctx.Data["LinkedPRs"] = linkedPrsMap
|
||||
ctx.Data["PageIsViewProjects"] = true
|
||||
ctx.Data["CanWriteProjects"] = canWriteProjects(ctx)
|
||||
|
@@ -2215,7 +2215,7 @@ func GetIssueInfo(ctx *context.Context) {
|
||||
|
||||
ctx.JSON(http.StatusOK, map[string]any{
|
||||
"convertedIssue": convert.ToIssue(ctx, ctx.Doer, issue),
|
||||
"renderedLabels": templates.RenderLabels(ctx, ctx.Locale, issue.Labels, ctx.Repo.RepoLink, issue),
|
||||
"renderedLabels": templates.NewRenderUtils(ctx).RenderLabels(issue.Labels, ctx.Repo.RepoLink, issue),
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user