Skip to content

Commit 12e4f4a

Browse files
committed
fix
1 parent 44aadc3 commit 12e4f4a

File tree

15 files changed

+97
-99
lines changed

15 files changed

+97
-99
lines changed

modules/templates/util_render.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import (
1414
"unicode"
1515

1616
issues_model "code.gitea.io/gitea/models/issues"
17+
"code.gitea.io/gitea/models/renderhelper"
18+
"code.gitea.io/gitea/models/repo"
1719
"code.gitea.io/gitea/modules/emoji"
1820
"code.gitea.io/gitea/modules/htmlutil"
1921
"code.gitea.io/gitea/modules/log"
@@ -34,11 +36,11 @@ func NewRenderUtils(ctx reqctx.RequestContext) *RenderUtils {
3436
}
3537

3638
// RenderCommitMessage renders commit message with XSS-safe and special links.
37-
func (ut *RenderUtils) RenderCommitMessage(msg string, metas map[string]string) template.HTML {
39+
func (ut *RenderUtils) RenderCommitMessage(msg string, repo *repo.Repository) template.HTML {
3840
cleanMsg := template.HTMLEscapeString(msg)
3941
// we can safely assume that it will not return any error, since there
4042
// shouldn't be any special HTML.
41-
fullMessage, err := markup.PostProcessCommitMessage(markup.NewRenderContext(ut.ctx).WithMetas(metas), cleanMsg)
43+
fullMessage, err := markup.PostProcessCommitMessage(renderhelper.NewRenderContextRepoComment(ut.ctx, repo), cleanMsg)
4244
if err != nil {
4345
log.Error("PostProcessCommitMessage: %v", err)
4446
return ""
@@ -52,7 +54,7 @@ func (ut *RenderUtils) RenderCommitMessage(msg string, metas map[string]string)
5254

5355
// RenderCommitMessageLinkSubject renders commit message as a XSS-safe link to
5456
// the provided default url, handling for special links without email to links.
55-
func (ut *RenderUtils) RenderCommitMessageLinkSubject(msg, urlDefault string, metas map[string]string) template.HTML {
57+
func (ut *RenderUtils) RenderCommitMessageLinkSubject(msg, urlDefault string, repo *repo.Repository) template.HTML {
5658
msgLine := strings.TrimLeftFunc(msg, unicode.IsSpace)
5759
lineEnd := strings.IndexByte(msgLine, '\n')
5860
if lineEnd > 0 {
@@ -63,9 +65,8 @@ func (ut *RenderUtils) RenderCommitMessageLinkSubject(msg, urlDefault string, me
6365
return ""
6466
}
6567

66-
// we can safely assume that it will not return any error, since there
67-
// shouldn't be any special HTML.
68-
renderedMessage, err := markup.PostProcessCommitMessageSubject(markup.NewRenderContext(ut.ctx).WithMetas(metas), urlDefault, template.HTMLEscapeString(msgLine))
68+
// we can safely assume that it will not return any error, since there shouldn't be any special HTML.
69+
renderedMessage, err := markup.PostProcessCommitMessageSubject(renderhelper.NewRenderContextRepoComment(ut.ctx, repo), urlDefault, template.HTMLEscapeString(msgLine))
6970
if err != nil {
7071
log.Error("PostProcessCommitMessageSubject: %v", err)
7172
return ""
@@ -74,7 +75,7 @@ func (ut *RenderUtils) RenderCommitMessageLinkSubject(msg, urlDefault string, me
7475
}
7576

7677
// RenderCommitBody extracts the body of a commit message without its title.
77-
func (ut *RenderUtils) RenderCommitBody(msg string, metas map[string]string) template.HTML {
78+
func (ut *RenderUtils) RenderCommitBody(msg string, repo *repo.Repository) template.HTML {
7879
msgLine := strings.TrimSpace(msg)
7980
lineEnd := strings.IndexByte(msgLine, '\n')
8081
if lineEnd > 0 {
@@ -87,7 +88,7 @@ func (ut *RenderUtils) RenderCommitBody(msg string, metas map[string]string) tem
8788
return ""
8889
}
8990

90-
renderedMessage, err := markup.PostProcessCommitMessage(markup.NewRenderContext(ut.ctx).WithMetas(metas), template.HTMLEscapeString(msgLine))
91+
renderedMessage, err := markup.PostProcessCommitMessage(renderhelper.NewRenderContextRepoComment(ut.ctx, repo), template.HTMLEscapeString(msgLine))
9192
if err != nil {
9293
log.Error("PostProcessCommitMessage: %v", err)
9394
return ""
@@ -105,8 +106,8 @@ func renderCodeBlock(htmlEscapedTextToRender template.HTML) template.HTML {
105106
}
106107

107108
// RenderIssueTitle renders issue/pull title with defined post processors
108-
func (ut *RenderUtils) RenderIssueTitle(text string, metas map[string]string) template.HTML {
109-
renderedText, err := markup.PostProcessIssueTitle(markup.NewRenderContext(ut.ctx).WithMetas(metas), template.HTMLEscapeString(text))
109+
func (ut *RenderUtils) RenderIssueTitle(text string, repo *repo.Repository) template.HTML {
110+
renderedText, err := markup.PostProcessIssueTitle(renderhelper.NewRenderContextRepoComment(ut.ctx, repo), template.HTMLEscapeString(text))
110111
if err != nil {
111112
log.Error("PostProcessIssueTitle: %v", err)
112113
return ""

modules/templates/util_render_legacy.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,22 +32,22 @@ func renderMarkdownToHtmlLegacy(ctx context.Context, input string) template.HTML
3232
return NewRenderUtils(reqctx.FromContext(ctx)).MarkdownToHtml(input)
3333
}
3434

35-
func renderCommitMessageLegacy(ctx context.Context, msg string, metas map[string]string) template.HTML {
35+
func renderCommitMessageLegacy(ctx context.Context, msg string, _ map[string]string) template.HTML {
3636
panicIfDevOrTesting()
37-
return NewRenderUtils(reqctx.FromContext(ctx)).RenderCommitMessage(msg, metas)
37+
return NewRenderUtils(reqctx.FromContext(ctx)).RenderCommitMessage(msg, nil)
3838
}
3939

40-
func renderCommitMessageLinkSubjectLegacy(ctx context.Context, msg, urlDefault string, metas map[string]string) template.HTML {
40+
func renderCommitMessageLinkSubjectLegacy(ctx context.Context, msg, urlDefault string, _ map[string]string) template.HTML {
4141
panicIfDevOrTesting()
42-
return NewRenderUtils(reqctx.FromContext(ctx)).RenderCommitMessageLinkSubject(msg, urlDefault, metas)
42+
return NewRenderUtils(reqctx.FromContext(ctx)).RenderCommitMessageLinkSubject(msg, urlDefault, nil)
4343
}
4444

45-
func renderIssueTitleLegacy(ctx context.Context, text string, metas map[string]string) template.HTML {
45+
func renderIssueTitleLegacy(ctx context.Context, text string, _ map[string]string) template.HTML {
4646
panicIfDevOrTesting()
47-
return NewRenderUtils(reqctx.FromContext(ctx)).RenderIssueTitle(text, metas)
47+
return NewRenderUtils(reqctx.FromContext(ctx)).RenderIssueTitle(text, nil)
4848
}
4949

50-
func renderCommitBodyLegacy(ctx context.Context, msg string, metas map[string]string) template.HTML {
50+
func renderCommitBodyLegacy(ctx context.Context, msg string, _ map[string]string) template.HTML {
5151
panicIfDevOrTesting()
52-
return NewRenderUtils(reqctx.FromContext(ctx)).RenderCommitBody(msg, metas)
52+
return NewRenderUtils(reqctx.FromContext(ctx)).RenderCommitBody(msg, nil)
5353
}

modules/templates/util_render_test.go

Lines changed: 60 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ import (
1111
"testing"
1212

1313
"code.gitea.io/gitea/models/issues"
14+
"code.gitea.io/gitea/models/repo"
1415
"code.gitea.io/gitea/models/unittest"
16+
user_model "code.gitea.io/gitea/models/user"
1517
"code.gitea.io/gitea/modules/git"
1618
"code.gitea.io/gitea/modules/log"
1719
"code.gitea.io/gitea/modules/markup"
@@ -47,14 +49,6 @@ [email protected]
4749
return strings.ReplaceAll(s, "<SPACE>", " ")
4850
}
4951

50-
var testMetas = map[string]string{
51-
"user": "user13",
52-
"repo": "repo11",
53-
"repoPath": "../../tests/gitea-repositories-meta/user13/repo11.git/",
54-
"markdownNewLineHardBreak": "true",
55-
"markupAllowShortIssuePattern": "true",
56-
}
57-
5852
func TestMain(m *testing.M) {
5953
unittest.InitSettingsForTesting()
6054
if err := git.InitSimple(context.Background()); err != nil {
@@ -74,46 +68,52 @@ func newTestRenderUtils(t *testing.T) *RenderUtils {
7468
return NewRenderUtils(ctx)
7569
}
7670

77-
func TestRenderCommitBody(t *testing.T) {
78-
defer test.MockVariableValue(&markup.RenderBehaviorForTesting.DisableAdditionalAttributes, true)()
79-
type args struct {
80-
msg string
71+
func TestRenderRepoComment(t *testing.T) {
72+
mockRepo := &repo.Repository{
73+
ID: 1, OwnerName: "user13", Name: "repo11",
74+
Owner: &user_model.User{ID: 13, Name: "user13"},
75+
Units: []*repo.RepoUnit{},
8176
}
82-
tests := []struct {
83-
name string
84-
args args
85-
want template.HTML
86-
}{
87-
{
88-
name: "multiple lines",
89-
args: args{
90-
msg: "first line\nsecond line",
77+
t.Run("RenderCommitBody", func(t *testing.T) {
78+
defer test.MockVariableValue(&markup.RenderBehaviorForTesting.DisableAdditionalAttributes, true)()
79+
type args struct {
80+
msg string
81+
}
82+
tests := []struct {
83+
name string
84+
args args
85+
want template.HTML
86+
}{
87+
{
88+
name: "multiple lines",
89+
args: args{
90+
msg: "first line\nsecond line",
91+
},
92+
want: "second line",
9193
},
92-
want: "second line",
93-
},
94-
{
95-
name: "multiple lines with leading newlines",
96-
args: args{
97-
msg: "\n\n\n\nfirst line\nsecond line",
94+
{
95+
name: "multiple lines with leading newlines",
96+
args: args{
97+
msg: "\n\n\n\nfirst line\nsecond line",
98+
},
99+
want: "second line",
98100
},
99-
want: "second line",
100-
},
101-
{
102-
name: "multiple lines with trailing newlines",
103-
args: args{
104-
msg: "first line\nsecond line\n\n\n",
101+
{
102+
name: "multiple lines with trailing newlines",
103+
args: args{
104+
msg: "first line\nsecond line\n\n\n",
105+
},
106+
want: "second line",
105107
},
106-
want: "second line",
107-
},
108-
}
109-
ut := newTestRenderUtils(t)
110-
for _, tt := range tests {
111-
t.Run(tt.name, func(t *testing.T) {
112-
assert.Equalf(t, tt.want, ut.RenderCommitBody(tt.args.msg, nil), "RenderCommitBody(%v, %v)", tt.args.msg, nil)
113-
})
114-
}
115-
116-
expected := `/just/a/path.bin
108+
}
109+
ut := newTestRenderUtils(t)
110+
for _, tt := range tests {
111+
t.Run(tt.name, func(t *testing.T) {
112+
assert.Equalf(t, tt.want, ut.RenderCommitBody(tt.args.msg, mockRepo), "RenderCommitBody(%v, %v)", tt.args.msg, nil)
113+
})
114+
}
115+
116+
expected := `/just/a/path.bin
117117
<a href="https://example.com/file.bin">https://example.com/file.bin</a>
118118
[local link](file.bin)
119119
[remote link](<a href="https://example.com">https://example.com</a>)
@@ -132,22 +132,22 @@ com 88fc37a3c0a4dda553bdcfc80c178a58247f42fb mit
132132
<a href="/mention-user">@mention-user</a> test
133133
<a href="/user13/repo11/issues/123" class="ref-issue">#123</a>
134134
space`
135-
assert.Equal(t, expected, string(newTestRenderUtils(t).RenderCommitBody(testInput(), testMetas)))
136-
}
135+
assert.Equal(t, expected, string(newTestRenderUtils(t).RenderCommitBody(testInput(), mockRepo)))
136+
})
137137

138-
func TestRenderCommitMessage(t *testing.T) {
139-
expected := `space <a href="/mention-user" data-markdown-generated-content="">@mention-user</a> `
140-
assert.EqualValues(t, expected, newTestRenderUtils(t).RenderCommitMessage(testInput(), testMetas))
141-
}
138+
t.Run("RenderCommitMessage", func(t *testing.T) {
139+
expected := `space <a href="/mention-user" data-markdown-generated-content="">@mention-user</a> `
140+
assert.EqualValues(t, expected, newTestRenderUtils(t).RenderCommitMessage(testInput(), mockRepo))
141+
})
142142

143-
func TestRenderCommitMessageLinkSubject(t *testing.T) {
144-
expected := `<a href="https://example.com/link" class="muted">space </a><a href="/mention-user" data-markdown-generated-content="">@mention-user</a>`
145-
assert.EqualValues(t, expected, newTestRenderUtils(t).RenderCommitMessageLinkSubject(testInput(), "https://example.com/link", testMetas))
146-
}
143+
t.Run("RenderCommitMessageLinkSubject", func(t *testing.T) {
144+
expected := `<a href="https://example.com/link" class="muted">space </a><a href="/mention-user" data-markdown-generated-content="">@mention-user</a>`
145+
assert.EqualValues(t, expected, newTestRenderUtils(t).RenderCommitMessageLinkSubject(testInput(), "https://example.com/link", mockRepo))
146+
})
147147

148-
func TestRenderIssueTitle(t *testing.T) {
149-
defer test.MockVariableValue(&markup.RenderBehaviorForTesting.DisableAdditionalAttributes, true)()
150-
expected := ` space @mention-user<SPACE><SPACE>
148+
t.Run("RenderIssueTitle", func(t *testing.T) {
149+
defer test.MockVariableValue(&markup.RenderBehaviorForTesting.DisableAdditionalAttributes, true)()
150+
expected := ` space @mention-user<SPACE><SPACE>
151151
/just/a/path.bin
152152
https://example.com/file.bin
153153
[local link](file.bin)
@@ -168,8 +168,9 @@ [email protected]
168168
<a href="/user13/repo11/issues/123" class="ref-issue">#123</a>
169169
space<SPACE><SPACE>
170170
`
171-
expected = strings.ReplaceAll(expected, "<SPACE>", " ")
172-
assert.Equal(t, expected, string(newTestRenderUtils(t).RenderIssueTitle(testInput(), testMetas)))
171+
expected = strings.ReplaceAll(expected, "<SPACE>", " ")
172+
assert.Equal(t, expected, string(newTestRenderUtils(t).RenderIssueTitle(testInput(), mockRepo)))
173+
})
173174
}
174175

175176
func TestRenderMarkdownToHtml(t *testing.T) {

routers/web/feed/convert.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,15 @@ func feedActionsToFeedItems(ctx *context.Context, actions activities_model.Actio
201201
switch act.OpType {
202202
case activities_model.ActionCommitRepo, activities_model.ActionMirrorSyncPush:
203203
push := templates.ActionContent2Commits(act)
204-
204+
_ = act.LoadRepo(ctx)
205205
for _, commit := range push.Commits {
206206
if len(desc) != 0 {
207207
desc += "\n\n"
208208
}
209209
desc += fmt.Sprintf("<a href=\"%s\">%s</a>\n%s",
210210
html.EscapeString(fmt.Sprintf("%s/commit/%s", act.GetRepoAbsoluteLink(ctx), commit.Sha1)),
211211
commit.Sha1,
212-
renderUtils.RenderCommitMessage(commit.Message, nil),
212+
renderUtils.RenderCommitMessage(commit.Message, act.Repo),
213213
)
214214
}
215215

routers/web/repo/actions/view.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,9 @@ func ViewPost(ctx *context_module.Context) {
200200
}
201201
}
202202

203-
// TODO: "ComposeCommentMetas" (usually for comment) is not quite right, but it is still the same as what template "RenderCommitMessage" does.
204-
// need to be refactored together in the future
205-
metas := ctx.Repo.Repository.ComposeCommentMetas(ctx)
206-
207203
// the title for the "run" is from the commit message
208204
resp.State.Run.Title = run.Title
209-
resp.State.Run.TitleHTML = templates.NewRenderUtils(ctx).RenderCommitMessage(run.Title, metas)
205+
resp.State.Run.TitleHTML = templates.NewRenderUtils(ctx).RenderCommitMessage(run.Title, ctx.Repo.Repository)
210206
resp.State.Run.Link = run.Link()
211207
resp.State.Run.CanCancel = !run.Status.IsDone() && ctx.Repo.CanWrite(unit.TypeActions)
212208
resp.State.Run.CanApprove = run.NeedApproval && ctx.Repo.CanWrite(unit.TypeActions)

templates/repo/branch/list.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DefaultBranchBranch.DBBranch.Name}}" data-tooltip-content="{{ctx.Locale.Tr "copy_branch"}}">{{svg "octicon-copy" 14}}</button>
2828
{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DefaultBranchBranch.DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DefaultBranchBranch.DBBranch.CommitID)}}
2929
</div>
30-
<p class="info tw-flex tw-items-center tw-my-1">{{svg "octicon-git-commit" 16 "tw-mr-1"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.DBBranch.CommitID}}">{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}}</a> · <span class="commit-message">{{ctx.RenderUtils.RenderCommitMessage .DefaultBranchBranch.DBBranch.CommitMessage (.Repository.ComposeCommentMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{DateUtils.TimeSince .DefaultBranchBranch.DBBranch.CommitTime}}{{if .DefaultBranchBranch.DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p>
30+
<p class="info tw-flex tw-items-center tw-my-1">{{svg "octicon-git-commit" 16 "tw-mr-1"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.DBBranch.CommitID}}">{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}}</a> · <span class="commit-message">{{ctx.RenderUtils.RenderCommitMessage .DefaultBranchBranch.DBBranch.CommitMessage .Repository}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{DateUtils.TimeSince .DefaultBranchBranch.DBBranch.CommitTime}}{{if .DefaultBranchBranch.DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p>
3131
</td>
3232
{{/* FIXME: here and below, the tw-overflow-visible is not quite right but it is still needed the moment: to show the important buttons when the width is narrow */}}
3333
<td class="tw-text-right tw-overflow-visible">
@@ -103,7 +103,7 @@
103103
<button class="btn interact-fg tw-px-1" data-clipboard-text="{{.DBBranch.Name}}" data-tooltip-content="{{ctx.Locale.Tr "copy_branch"}}">{{svg "octicon-copy" 14}}</button>
104104
{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DBBranch.CommitID)}}
105105
</div>
106-
<p class="info tw-flex tw-items-center tw-my-1">{{svg "octicon-git-commit" 16 "tw-mr-1"}}<a href="{{$.RepoLink}}/commit/{{PathEscape .DBBranch.CommitID}}">{{ShortSha .DBBranch.CommitID}}</a> · <span class="commit-message">{{ctx.RenderUtils.RenderCommitMessage .DBBranch.CommitMessage ($.Repository.ComposeCommentMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{DateUtils.TimeSince .DBBranch.CommitTime}}{{if .DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "user" .DBBranch.Pusher}} &nbsp;{{template "shared/user/namelink" .DBBranch.Pusher}}{{end}}</p>
106+
<p class="info tw-flex tw-items-center tw-my-1">{{svg "octicon-git-commit" 16 "tw-mr-1"}}<a href="{{$.RepoLink}}/commit/{{PathEscape .DBBranch.CommitID}}">{{ShortSha .DBBranch.CommitID}}</a> · <span class="commit-message">{{ctx.RenderUtils.RenderCommitMessage .DBBranch.CommitMessage $.Repository}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{DateUtils.TimeSince .DBBranch.CommitTime}}{{if .DBBranch.Pusher}} &nbsp;{{template "shared/user/avatarlink" dict "user" .DBBranch.Pusher}} &nbsp;{{template "shared/user/namelink" .DBBranch.Pusher}}{{end}}</p>
107107
{{end}}
108108
</td>
109109
<td class="two wide ui">

templates/repo/commit_page.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<div class="ui container fluid padded">
66
<div class="ui top attached header clearing segment tw-relative commit-header">
77
<div class="tw-flex tw-mb-4 tw-gap-1">
8-
<h3 class="tw-mb-0 tw-flex-1"><span class="commit-summary" title="{{.Commit.Summary}}">{{ctx.RenderUtils.RenderCommitMessage .Commit.Message ($.Repository.ComposeCommentMetas ctx)}}</span>{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses}}</h3>
8+
<h3 class="tw-mb-0 tw-flex-1"><span class="commit-summary" title="{{.Commit.Summary}}">{{ctx.RenderUtils.RenderCommitMessage .Commit.Message $.Repository}}</span>{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses}}</h3>
99
{{if not $.PageIsWiki}}
1010
<div class="commit-header-buttons">
1111
<a class="ui primary tiny button" href="{{.SourcePath}}">
@@ -122,7 +122,7 @@
122122
{{end}}
123123
</div>
124124
{{if IsMultilineCommitMessage .Commit.Message}}
125-
<pre class="commit-body">{{ctx.RenderUtils.RenderCommitBody .Commit.Message ($.Repository.ComposeCommentMetas ctx)}}</pre>
125+
<pre class="commit-body">{{ctx.RenderUtils.RenderCommitBody .Commit.Message $.Repository}}</pre>
126126
{{end}}
127127
{{template "repo/commit_load_branches_and_tags" .}}
128128
</div>

templates/repo/commits_list.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@
4444
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary | ctx.RenderUtils.RenderEmoji}}</span>
4545
{{else}}
4646
{{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}}
47-
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{ctx.RenderUtils.RenderCommitMessageLinkSubject .Message $commitLink ($.Repository.ComposeCommentMetas ctx)}}</span>
47+
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{ctx.RenderUtils.RenderCommitMessageLinkSubject .Message $commitLink $.Repository}}</span>
4848
{{end}}
4949
</span>
5050
{{if IsMultilineCommitMessage .Message}}
5151
<button class="ui button ellipsis-button" aria-expanded="false" data-global-click="onRepoEllipsisButtonClick">...</button>
5252
{{end}}
5353
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}}
5454
{{if IsMultilineCommitMessage .Message}}
55-
<pre class="commit-body tw-hidden">{{ctx.RenderUtils.RenderCommitBody .Message ($.Repository.ComposeCommentMetas ctx)}}</pre>
55+
<pre class="commit-body tw-hidden">{{ctx.RenderUtils.RenderCommitBody .Message $.Repository}}</pre>
5656
{{end}}
5757
{{if $.CommitsTagsMap}}
5858
{{range (index $.CommitsTagsMap .ID.String)}}

0 commit comments

Comments
 (0)