Fix issue link rendering in commit messages (#2897)

* Fix issue link rendering in commit messages

* Update page.tmpl

* No links for parens

* remove comment
This commit is contained in:
Ethan Koenig
2017-11-12 17:35:55 -08:00
committed by Lunny Xiao
parent 47f40ccd5e
commit 5481be0ac5
7 changed files with 126 additions and 52 deletions

View File

@ -60,7 +60,7 @@
</a>
</td>
<td class="message collapsing">
<span class="has-emoji{{if gt .ParentCount 1}} grey text{{end}}">{{RenderCommitMessage false .Summary $.RepoLink $.Repository.ComposeMetas}}</span>
<span class="has-emoji{{if gt .ParentCount 1}} grey text{{end}}">{{RenderCommitMessage .Summary $.RepoLink $.Repository.ComposeMetas}}</span>
{{template "repo/commit_status" .Status}}
</td>
<td class="grey text right aligned">{{TimeSince .Author.When $.Lang}}</td>

View File

@ -9,7 +9,7 @@
<a class="ui floated right blue tiny button" href="{{EscapePound .SourcePath}}">
{{.i18n.Tr "repo.diff.browse_source"}}
</a>
<h3>{{RenderCommitMessage false .Commit.Message $.RepoLink $.Repository.ComposeMetas}}{{template "repo/commit_status" .CommitStatus}}</h3>
<h3>{{RenderCommitMessage .Commit.Message $.RepoLink $.Repository.ComposeMetas}}{{template "repo/commit_status" .CommitStatus}}</h3>
</div>
<div class="ui attached info segment {{if .Commit.Signature}} isSigned {{if .Verification.Verified }} isVerified {{end}}{{end}}">
{{if .Author}}

View File

@ -26,7 +26,7 @@
<a href="{{AppSubUrl}}/{{$.Username}}/{{$.Reponame}}/commit/{{.Rev}}">{{ .ShortRev}}</a>
</code>
<strong> {{.Branch}}</strong>
<em>{{RenderCommitMessage false .Subject $.RepoLink $.Repository.ComposeMetas}}</em> by
<em>{{RenderCommitMessage .Subject $.RepoLink $.Repository.ComposeMetas}}</em> by
<span class="author">
{{.Author}}
</span>

View File

@ -27,7 +27,7 @@
</div>
{{end}}
</a>
<span class="grey has-emoji">{{RenderCommitMessage false .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas}}
<span class="grey has-emoji">{{RenderCommitMessage .LatestCommit.Summary .RepoLink $.Repository.ComposeMetas}}
{{template "repo/commit_status" .LatestCommitStatus}}</span>
</th>
<th class="nine wide">
@ -75,9 +75,7 @@
</td>
{{end}}
<td class="message collapsing has-emoji">
<a rel="nofollow" href="{{$.RepoLink}}/commit/{{$commit.ID}}">
{{RenderCommitMessage false $commit.Summary $.RepoLink $.Repository.ComposeMetas}}
</a>
{{RenderCommitMessageLink $commit.Summary $.RepoLink (print $.RepoLink "/commit/" $commit.ID) $.Repository.ComposeMetas}}
</td>
<td class="text grey right age">{{TimeSince $commit.Committer.When $.Lang}}</td>
</tr>