Skip to content

Commit 5b40a23

Browse files
committed
more fixes
1 parent cb8be2e commit 5b40a23

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

services/markup/renderhelper_codepreview_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func TestRenderHelperCodePreview(t *testing.T) {
2424
OwnerName: "user2",
2525
RepoName: "repo1",
2626
CommitID: "65f1bf27bc3bf70f64657658635e66094edbcb4d",
27-
FilePath: "/README.md",
27+
FilePath: "README.md",
2828
LineStart: 1,
2929
LineStop: 2,
3030
})

templates/base/markup_codepreview.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="code-preview-container file-content">
22
<div class="code-preview-header">
33
<a href="{{.FullURL}}" class="tw-font-semibold" rel="nofollow">{{.RepoName}}/{{.FilePath}}</a>
4-
{{$link := HTMLFormat `<a href="%s/commit/%s" class="muted tw-font-mono tw-text-text">%s</a>` .RepoLink .CommitID (.CommitID | ShortSha) -}}
4+
{{$link := HTMLFormat `<a href="%s/commit/%s" class="muted tw-font-mono tw-text-text" rel="nofollow">%s</a>` .RepoLink .CommitID (.CommitID | ShortSha) -}}
55
{{- if eq .LineStart .LineStop -}}
66
{{ctx.Locale.Tr "repo.code_preview_line_in" .LineStart $link}}
77
{{- else -}}

0 commit comments

Comments
 (0)