mirror of
https://github.com/go-gitea/gitea.git
synced 2025-11-03 06:35:19 +01:00
more fixes
This commit is contained in:
parent
cb8be2e50a
commit
5b40a23926
@ -24,7 +24,7 @@ func TestRenderHelperCodePreview(t *testing.T) {
|
|||||||
OwnerName: "user2",
|
OwnerName: "user2",
|
||||||
RepoName: "repo1",
|
RepoName: "repo1",
|
||||||
CommitID: "65f1bf27bc3bf70f64657658635e66094edbcb4d",
|
CommitID: "65f1bf27bc3bf70f64657658635e66094edbcb4d",
|
||||||
FilePath: "/README.md",
|
FilePath: "README.md",
|
||||||
LineStart: 1,
|
LineStart: 1,
|
||||||
LineStop: 2,
|
LineStop: 2,
|
||||||
})
|
})
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<div class="code-preview-container file-content">
|
<div class="code-preview-container file-content">
|
||||||
<div class="code-preview-header">
|
<div class="code-preview-header">
|
||||||
<a href="{{.FullURL}}" class="tw-font-semibold" rel="nofollow">{{.RepoName}}/{{.FilePath}}</a>
|
<a href="{{.FullURL}}" class="tw-font-semibold" rel="nofollow">{{.RepoName}}/{{.FilePath}}</a>
|
||||||
{{$link := HTMLFormat `<a href="%s/commit/%s" class="muted tw-font-mono tw-text-text">%s</a>` .RepoLink .CommitID (.CommitID | ShortSha) -}}
|
{{$link := HTMLFormat `<a href="%s/commit/%s" class="muted tw-font-mono tw-text-text" rel="nofollow">%s</a>` .RepoLink .CommitID (.CommitID | ShortSha) -}}
|
||||||
{{- if eq .LineStart .LineStop -}}
|
{{- if eq .LineStart .LineStop -}}
|
||||||
{{ctx.Locale.Tr "repo.code_preview_line_in" .LineStart $link}}
|
{{ctx.Locale.Tr "repo.code_preview_line_in" .LineStart $link}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user