Skip to content

Add whitespace removal inside template curly brackes #20853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 25, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -242,8 +242,10 @@ clean:

.PHONY: fmt
fmt:
@echo "Running gitea-fmt (with gofumpt)..."
@MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -w '{file-list}'
$(eval TEMPLATES := $(wildcard templates/**/*.tmpl))
@# strip whitespace after '{{' and before `}}` unless there is only whitespace before it
@$(SED_INPLACE) -e 's/{{[ ]\{1,\}/{{/g' -e '/^[ ]\{1,\}}}/! s/[ ]\{1,\}}}/}}/g' $(TEMPLATES)

.PHONY: vet
vet:
@@ -288,13 +290,19 @@ errcheck:

.PHONY: fmt-check
fmt-check:
# get all go files and run gitea-fmt (with gofmt) on them
@# get all go files and run gitea-fmt (with gofmt) on them
@diff=$$(MISSPELL_PACKAGE=$(MISSPELL_PACKAGE) GOFUMPT_PACKAGE=$(GOFUMPT_PACKAGE) $(GO) run build/code-batch-process.go gitea-fmt -l '{file-list}'); \
if [ -n "$$diff" ]; then \
echo "Please run 'make fmt' and commit the result:"; \
echo "$${diff}"; \
exit 1; \
fi
@diff2=$$(git diff templates); \
if [ -n "$$diff2" ]; then \
echo "Please run 'make fmt' and commit the result:"; \
echo "$${diff2}"; \
exit 1; \
fi

.PHONY: checks
checks: checks-frontend checks-backend
2 changes: 1 addition & 1 deletion templates/admin/config.tmpl
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@
<dt>{{.locale.Tr "admin.config.reverse_auth_user"}}</dt>
<dd>{{.ReverseProxyAuthUser}}</dd>

{{if .EnvVars }}
{{if .EnvVars}}
<div class="ui divider"></div>
{{range .EnvVars}}
<dt>{{.Name}}</dt>
4 changes: 2 additions & 2 deletions templates/admin/cron.tmpl
Original file line number Diff line number Diff line change
@@ -22,9 +22,9 @@
<td>{{$.locale.Tr (printf "admin.dashboard.%s" .Name)}}</td>
<td>{{.Spec}}</td>
<td>{{DateFmtLong .Next}}</td>
<td>{{if gt .Prev.Year 1 }}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
<td>{{if gt .Prev.Year 1}}{{DateFmtLong .Prev}}{{else}}N/A{{end}}</td>
<td>{{.ExecTimes}}</td>
<td {{if ne .Status ""}}class="tooltip" data-content="{{.FormatLastMessage $.locale}}"{{end}} >{{if eq .Status "" }}—{{else if eq .Status "finished"}}{{svg "octicon-check" 16}}{{else}}{{svg "octicon-x" 16}}{{end}}</td>
<td {{if ne .Status ""}}class="tooltip" data-content="{{.FormatLastMessage $.locale}}"{{end}} >{{if eq .Status ""}}—{{else if eq .Status "finished"}}{{svg "octicon-check" 16}}{{else}}{{svg "octicon-x" 16}}{{end}}</td>
</tr>
{{end}}
</tbody>
6 changes: 3 additions & 3 deletions templates/admin/notice.tmpl
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
</tr>
{{end}}
</tbody>
{{ if .Notices }}
{{if .Notices}}
<tfoot class="full-width">
<tr>
<th></th>
@@ -65,11 +65,11 @@
</th>
</tr>
</tfoot>
{{ end }}
{{end}}
</table>
</div>

{{ template "base/paginate" . }}
{{template "base/paginate" .}}
</div>
</div>

2 changes: 1 addition & 1 deletion templates/admin/process-row.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="item">
<div class="df ac">
<div class="icon ml-3 mr-3">{{if eq .Process.Type "request"}}{{svg "octicon-globe" 16 }}{{else if eq .Process.Type "system"}}{{svg "octicon-cpu" 16 }}{{else}}{{svg "octicon-terminal" 16 }}{{end}}</div>
<div class="icon ml-3 mr-3">{{if eq .Process.Type "request"}}{{svg "octicon-globe" 16}}{{else if eq .Process.Type "system"}}{{svg "octicon-cpu" 16}}{{else}}{{svg "octicon-terminal" 16}}{{end}}</div>
<div class="content f1">
<div class="header">{{.Process.Description}}</div>
<div class="description"><span title="{{DateFmtLong .Process.Start}}">{{TimeSince .Process.Start .root.locale}}</span></div>
8 changes: 4 additions & 4 deletions templates/admin/queue.tmpl
Original file line number Diff line number Diff line change
@@ -30,12 +30,12 @@
</tbody>
</table>
</div>
{{if lt $sum 0 }}
{{if lt $sum 0}}
<h4 class="ui top attached header">
{{.locale.Tr "admin.monitor.queue.nopool.title"}}
</h4>
<div class="ui attached segment">
{{if eq .Queue.Type "wrapped" }}
{{if eq .Queue.Type "wrapped"}}
<p>{{.locale.Tr "admin.monitor.queue.wrapped.desc"}}</p>
{{else if eq .Queue.Type "persistable-channel"}}
<p>{{.locale.Tr "admin.monitor.queue.persistable-channel.desc"}}</p>
@@ -58,7 +58,7 @@
</div>
<div class="inline field">
<label for="timeout">{{.locale.Tr "admin.monitor.queue.settings.timeout"}}</label>
<input name="timeout" type="text" placeholder="{{.locale.Tr "admin.monitor.queue.settings.timeout.placeholder" .Queue.BoostTimeout }}">
<input name="timeout" type="text" placeholder="{{.locale.Tr "admin.monitor.queue.settings.timeout.placeholder" .Queue.BoostTimeout}}">
</div>
<div class="inline field">
<label for="number">{{.locale.Tr "admin.monitor.queue.settings.numberworkers"}}</label>
@@ -166,7 +166,7 @@
</tr>
{{else}}
<tr>
<td colspan="4">{{.locale.Tr "admin.monitor.queue.pool.workers.none" }}
<td colspan="4">{{.locale.Tr "admin.monitor.queue.pool.workers.none"}}
</tr>
{{end}}
</tbody>
14 changes: 7 additions & 7 deletions templates/admin/stacktrace-row.tmpl
Original file line number Diff line number Diff line change
@@ -2,21 +2,21 @@
<div class="df ac">
<div class="icon ml-3 mr-3">
{{if eq .Process.Type "request"}}
{{svg "octicon-globe" 16 }}
{{svg "octicon-globe" 16}}
{{else if eq .Process.Type "system"}}
{{svg "octicon-cpu" 16 }}
{{svg "octicon-cpu" 16}}
{{else if eq .Process.Type "normal"}}
{{svg "octicon-terminal" 16 }}
{{svg "octicon-terminal" 16}}
{{else}}
{{svg "octicon-code" 16 }}
{{svg "octicon-code" 16}}
{{end}}
</div>
<div class="content f1">
<div class="header">{{.Process.Description}}</div>
<div class="description">{{if ne .Process.Type "none"}}<span title="{{DateFmtLong .Process.Start}}">{{TimeSince .Process.Start .root.locale}}</span>{{end}}</div>
</div>
<div>
{{if or (eq .Process.Type "request") (eq .Process.Type "normal") }}
{{if or (eq .Process.Type "request") (eq .Process.Type "normal")}}
<a class="delete-button icon" href="" data-url="{{.root.Link}}/cancel/{{.Process.PID}}" data-id="{{.Process.PID}}" data-name="{{.Process.Description}}">{{svg "octicon-trash" 16 "text-red"}}</a>
{{end}}
</div>
@@ -29,7 +29,7 @@
<summary>
<div class="dif content">
<div class="header ml-3">
<span class="icon mr-3">{{svg "octicon-code" 16 }}</span>{{.Description}}{{if gt .Count 1}} * {{.Count}}{{end}}
<span class="icon mr-3">{{svg "octicon-code" 16}}</span>{{.Description}}{{if gt .Count 1}} * {{.Count}}{{end}}
</div>
<div class="description">
{{range .Labels}}
@@ -41,7 +41,7 @@
<div class="list">
{{range .Entry}}
<div class="item df ac">
<span class="icon mr-4">{{svg "octicon-dot-fill" 16 }}</span>
<span class="icon mr-4">{{svg "octicon-dot-fill" 16}}</span>
<div class="content f1">
<div class="header"><code>{{.Function}}</code></div>
<div class="description"><code>{{.File}}:{{.Line}}</code></div>
2 changes: 1 addition & 1 deletion templates/base/footer.tmpl
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
<!-- Third-party libraries -->
{{if .EnableCaptcha}}
{{if eq .CaptchaType "recaptcha"}}
<script src='{{ URLJoin .RecaptchaURL "api.js"}}' async></script>
<script src='{{URLJoin .RecaptchaURL "api.js"}}' async></script>
{{end}}
{{if eq .CaptchaType "hcaptcha"}}
<script src='https://hcaptcha.com/1/api.js' async></script>
4 changes: 2 additions & 2 deletions templates/base/head.tmpl
Original file line number Diff line number Diff line change
@@ -65,8 +65,8 @@
<meta property="og:description" content="{{MetaDescription}}">
{{end}}
<meta property="og:site_name" content="{{AppName}}">
{{if .IsSigned }}
{{ if ne .SignedUser.Theme "gitea" }}
{{if .IsSigned}}
{{if ne .SignedUser.Theme "gitea"}}
<link rel="stylesheet" href="{{AssetUrlPrefix}}/css/theme-{{.SignedUser.Theme | PathEscape}}.css?v={{AssetVersion}}">
{{end}}
{{else if ne DefaultTheme "gitea"}}
12 changes: 6 additions & 6 deletions templates/base/head_script.tmpl
Original file line number Diff line number Diff line change
@@ -21,18 +21,18 @@ If you introduce mistakes in it, Gitea JavaScript code wouldn't run correctly.
enableTimeTracking: {{EnableTimetracking}},
{{if .RequireTribute}}
tributeValues: Array.from(new Map([
{{ range .Participants }}
{{range .Participants}}
['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.AvatarLink}}'}],
{{ end }}
{{ range .Assignees }}
{{end}}
{{range .Assignees}}
['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.AvatarLink}}'}],
{{ end }}
{{ range .MentionableTeams }}
{{end}}
{{range .MentionableTeams}}
['{{$.MentionableTeamsOrg}}/{{.Name}}', {key: '{{$.MentionableTeamsOrg}}/{{.Name}}', value: '{{$.MentionableTeamsOrg}}/{{.Name}}',
name: '{{$.MentionableTeamsOrg}}/{{.Name}}', avatar: '{{$.MentionableTeamsOrgAvatar}}'}],
{{ end }}
{{end}}
]).values()),
{{end}}
mermaidMaxSourceCharacters: {{MermaidMaxSourceCharacters}},
12 changes: 6 additions & 6 deletions templates/explore/code.tmpl
Original file line number Diff line number Diff line change
@@ -4,27 +4,27 @@
<div class="ui container">
<form class="ui form ignore-dirty" style="max-width: 100%">
<div class="ui fluid action input">
<input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable }} disabled{{end}} placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
<div class="ui dropdown selection{{if .CodeIndexerUnavailable }} disabled{{end}}">
<input name="t" type="hidden" value="{{.queryType}}"{{if .CodeIndexerUnavailable }} disabled{{end}}>{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable}} disabled{{end}} placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
<div class="ui dropdown selection{{if .CodeIndexerUnavailable}} disabled{{end}}">
<input name="t" type="hidden" value="{{.queryType}}"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="text">{{.locale.Tr (printf "explore.search.%s" (or .queryType "fuzzy"))}}</div>
<div class="menu transition hidden" tabindex="-1" style="display: block !important;">
<div class="item" data-value="">{{.locale.Tr "explore.search.fuzzy"}}</div>
<div class="item" data-value="match">{{.locale.Tr "explore.search.match"}}</div>
</div>
</div>
<button class="ui primary button"{{if .CodeIndexerUnavailable }} disabled{{end}}>{{.locale.Tr "explore.search"}}</button>
<button class="ui primary button"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{.locale.Tr "explore.search"}}</button>
</div>
</form>
<div class="ui divider"></div>
<div class="ui user list">
{{if .CodeIndexerUnavailable }}
{{if .CodeIndexerUnavailable}}
<div class="ui error message">
<p>{{$.locale.Tr "explore.code_search_unavailable"}}</p>
</div>
{{else if .SearchResults}}
<h3>
{{.locale.Tr "explore.code_search_results" (.Keyword|Escape) | Str2html }}
{{.locale.Tr "explore.code_search_results" (.Keyword|Escape) | Str2html}}
</h3>
<div class="df ac fw">
{{range $term := .SearchResultLanguages}}
12 changes: 6 additions & 6 deletions templates/explore/repo_list.tmpl
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
{{$avatar}}
{{end}}
<a class="name" href="{{.Link}}">
{{if or $.PageIsExplore $.PageIsProfileStarList }}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}
{{if or $.PageIsExplore $.PageIsProfileStarList}}{{if .Owner}}{{.Owner.Name}} / {{end}}{{end}}{{.Name}}
</a>
<div class="labels df ac fw">
{{if .IsArchived}}
@@ -39,9 +39,9 @@
</div>
</div>
<div class="metas df ac">
{{if .PrimaryLanguage }}
{{if .PrimaryLanguage}}
<a href="{{$.Link}}?q={{$.Keyword}}&sort={{$.SortType}}&language={{.PrimaryLanguage.Language}}">
<span class="text grey df ac mr-3"><i class="color-icon mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{ .PrimaryLanguage.Language }}</span>
<span class="text grey df ac mr-3"><i class="color-icon mr-3" style="background-color: {{.PrimaryLanguage.Color}}"></i>{{.PrimaryLanguage.Language}}</span>
</a>
{{end}}
{{if not $.DisableStars}}
@@ -51,12 +51,12 @@
</div>
</div>
<div class="description">
{{ $description := .DescriptionHTML $.Context}}
{{$description := .DescriptionHTML $.Context}}
{{if $description}}<p>{{$description}}</p>{{end}}
{{if .Topics }}
{{if .Topics}}
<div class="ui tags">
{{range .Topics}}
{{if ne . "" }}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui small label topic">{{.}}</div></a>{{end}}
{{if ne . ""}}<a href="{{AppSubUrl}}/explore/repos?q={{.}}&topic=1"><div class="ui small label topic">{{.}}</div></a>{{end}}
{{end}}
</div>
{{end}}
2 changes: 1 addition & 1 deletion templates/mail/release.tmpl
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@

</head>

{{$release_url := printf "<a href='%s'>%s</a>" (.Release.HTMLURL | Escape) (.Release.TagName | Escape) }}
{{$release_url := printf "<a href='%s'>%s</a>" (.Release.HTMLURL | Escape) (.Release.TagName | Escape)}}
{{$repo_url := printf "<a href='%s'>%s</a>" (.Release.Repo.HTMLURL | Escape) (.Release.Repo.FullName | Escape)}}
<body>
<p>
18 changes: 9 additions & 9 deletions templates/repo/activity.tmpl
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@
<a class="table-cell tiny background light grey"></a>
</div>
{{end}}
{{.locale.TrN .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n" .Activity.ActivePRCount | Safe }}
{{.locale.TrN .Activity.ActivePRCount "repo.activity.active_prs_count_1" "repo.activity.active_prs_count_n" .Activity.ActivePRCount | Safe}}
</div>
{{end}}
{{if .Permission.CanRead $.UnitTypeIssues}}
@@ -56,7 +56,7 @@
<a class="table-cell tiny background light grey"></a>
</div>
{{end}}
{{.locale.TrN .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n" .Activity.ActiveIssueCount | Safe }}
{{.locale.TrN .Activity.ActiveIssueCount "repo.activity.active_issues_count_1" "repo.activity.active_issues_count_n" .Activity.ActiveIssueCount | Safe}}
</div>
{{end}}
</div>
@@ -87,25 +87,25 @@
{{if .Permission.CanRead $.UnitTypeCode}}
{{if eq .Activity.Code.CommitCountInAllBranches 0}}
<div class="ui center aligned segment">
<h4 class="ui header">{{.locale.Tr "repo.activity.no_git_activity" }}</h4>
<h4 class="ui header">{{.locale.Tr "repo.activity.no_git_activity"}}</h4>
</div>
{{end}}
{{if gt .Activity.Code.CommitCountInAllBranches 0}}
<div class="ui attached segment horizontal segments">
<div class="ui attached segment text">
{{.locale.Tr "repo.activity.git_stats_exclude_merges" }}
{{.locale.Tr "repo.activity.git_stats_exclude_merges"}}
<strong>{{.locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_author_1" "repo.activity.git_stats_author_n" .Activity.Code.AuthorCount}}</strong>
{{.locale.TrN .Activity.Code.AuthorCount "repo.activity.git_stats_pushed_1" "repo.activity.git_stats_pushed_n"}}
<strong>{{.locale.TrN .Activity.Code.CommitCount "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCount}}</strong>
{{.locale.Tr "repo.activity.git_stats_push_to_branch" .Repository.DefaultBranch }}
{{.locale.Tr "repo.activity.git_stats_push_to_branch" .Repository.DefaultBranch}}
<strong>{{.locale.TrN .Activity.Code.CommitCountInAllBranches "repo.activity.git_stats_commit_1" "repo.activity.git_stats_commit_n" .Activity.Code.CommitCountInAllBranches}}</strong>
{{.locale.Tr "repo.activity.git_stats_push_to_all_branches" }}
{{.locale.Tr "repo.activity.git_stats_on_default_branch" .Repository.DefaultBranch }}
{{.locale.Tr "repo.activity.git_stats_push_to_all_branches"}}
{{.locale.Tr "repo.activity.git_stats_on_default_branch" .Repository.DefaultBranch}}
<strong>{{.locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_file_1" "repo.activity.git_stats_file_n" .Activity.Code.ChangedFiles}}</strong>
{{.locale.TrN .Activity.Code.ChangedFiles "repo.activity.git_stats_files_changed_1" "repo.activity.git_stats_files_changed_n"}}
{{.locale.Tr "repo.activity.git_stats_additions" }}
{{.locale.Tr "repo.activity.git_stats_additions"}}
<strong class="text green">{{.locale.TrN .Activity.Code.Additions "repo.activity.git_stats_addition_1" "repo.activity.git_stats_addition_n" .Activity.Code.Additions}}</strong>
{{.locale.Tr "repo.activity.git_stats_and_deletions" }}
{{.locale.Tr "repo.activity.git_stats_and_deletions"}}
<strong class="text red">{{.locale.TrN .Activity.Code.Deletions "repo.activity.git_stats_deletion_1" "repo.activity.git_stats_deletion_n" .Activity.Code.Deletions}}</strong>.
</div>
<div class="ui attached segment">
4 changes: 2 additions & 2 deletions templates/repo/commit_page.tmpl
Original file line number Diff line number Diff line change
@@ -87,7 +87,7 @@
{{.CsrfTokenHtml}}
<div class="field">
<label>
{{.locale.Tr "repo.branch.new_branch_from" "<span class=\"text\" id=\"modal-create-branch-from-span\"></span>" | Safe }}
{{.locale.Tr "repo.branch.new_branch_from" "<span class=\"text\" id=\"modal-create-branch-from-span\"></span>" | Safe}}
</label>
</div>
<div class="required field">
@@ -112,7 +112,7 @@
<input type="hidden" name="create_tag" value="true">
<div class="field">
<label>
{{.locale.Tr "repo.tag.create_tag_from" "<span class=\"text\" id=\"modal-create-tag-from-span\"></span>" | Safe }}
{{.locale.Tr "repo.tag.create_tag_from" "<span class=\"text\" id=\"modal-create-tag-from-span\"></span>" | Safe}}
</label>
</div>
<div class="required field">
4 changes: 2 additions & 2 deletions templates/repo/commits_list.tmpl
Original file line number Diff line number Diff line change
@@ -62,8 +62,8 @@
<span class="message-wrapper">
{{if $.PageIsWiki}}
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{.Summary | RenderEmoji}}</span>
{{else }}
{{ $commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String) }}
{{else}}
{{$commitLink:= printf "%s/commit/%s" $commitRepoLink (PathEscape .ID.String)}}
<span class="commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.Context .Message $commitRepoLink $commitLink $.Repository.ComposeMetas}}</span>
{{end}}
</span>
8 changes: 4 additions & 4 deletions templates/repo/commits_list_small.tmpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{{ $index := 0}}
{{$index := 0}}
<div class="timeline-item commits-list">
{{range .comment.Commits}}
{{ $tag := printf "%s-%d" $.comment.HashTag $index }}
{{ $index = Add $index 1}}
{{$tag := printf "%s-%d" $.comment.HashTag $index}}
{{$index = Add $index 1}}
<div class="singular-commit" id="{{$tag}}">
<span class="badge badge-commit">{{svg "octicon-git-commit"}}</span>
{{if .User}}
@@ -46,7 +46,7 @@
{{end}}
</span>

{{ $commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String) }}
{{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}}
<span class="mono commit-summary {{if gt .ParentCount 1}} grey text{{end}}" title="{{.Summary}}">{{RenderCommitMessageLinkSubject $.root.Context .Message ($.comment.Issue.PullRequest.BaseRepo.Link|Escape) $commitLink $.comment.Issue.PullRequest.BaseRepo.ComposeMetas}}</span>
{{if IsMultilineCommitMessage .Message}}
<button class="ui button ellipsis-button" aria-expanded="false">...</button>
2 changes: 1 addition & 1 deletion templates/repo/commits_table.tmpl
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
{{if or .PageIsCommits (gt .CommitCount 0)}}
{{.CommitCount}} {{.locale.Tr "repo.commits.commits"}} {{if .RefName}}({{.RefName}}){{end}}
{{else if .IsNothingToCompare}}
{{.locale.Tr "repo.commits.nothing_to_compare" }} {{if .RefName}}({{.RefName}}){{end}}
{{.locale.Tr "repo.commits.nothing_to_compare"}} {{if .RefName}}({{.RefName}}){{end}}
{{else}}
{{.locale.Tr "repo.commits.no_commits" $.BaseBranch $.HeadBranch}} {{if .RefName}}({{.RefName}}){{end}}
{{end}}
Loading