mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 10:48:37 +00:00
Backport #34621 by @charles7668 Close #34511 Close #34590 Add comment ID to the footnote item's id attribute to ensure uniqueness. Co-authored-by: charles <30816317+charles7668@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"fmt"
|
||||
"html/template"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
issues_model "code.gitea.io/gitea/models/issues"
|
||||
"code.gitea.io/gitea/models/renderhelper"
|
||||
@@ -278,7 +279,9 @@ func UpdateCommentContent(ctx *context.Context) {
|
||||
|
||||
var renderedContent template.HTML
|
||||
if comment.Content != "" {
|
||||
rctx := renderhelper.NewRenderContextRepoComment(ctx, ctx.Repo.Repository)
|
||||
rctx := renderhelper.NewRenderContextRepoComment(ctx, ctx.Repo.Repository, renderhelper.RepoCommentOptions{
|
||||
FootnoteContextID: strconv.FormatInt(comment.ID, 10),
|
||||
})
|
||||
renderedContent, err = markdown.RenderString(rctx, comment.Content)
|
||||
if err != nil {
|
||||
ctx.ServerError("RenderString", err)
|
||||
|
Reference in New Issue
Block a user