File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff 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 })
Original file line number Diff line number Diff line change 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 -}}
You can’t perform that action at this time.
0 commit comments