@@ -24,15 +24,15 @@ 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 })
3131 assert .NoError (t , err )
3232 assert .Equal (t , `<div class="code-preview-container file-content">
3333 <div class="code-preview-header">
34- <a href="http://full" class="muted " rel="nofollow">/README.md</a>
35- repo.code_preview_line_from_to:1,2,<a href="/user2/repo1/src/ commit/65f1bf27bc3bf70f64657658635e66094edbcb4d" rel="nofollow">65f1bf27bc</a>
34+ <a href="http://full" class="tw-font-semibold " rel="nofollow">repo1 /README.md</a>
35+ repo.code_preview_line_from_to:1,2,<a href="/user2/repo1/commit/65f1bf27bc3bf70f64657658635e66094edbcb4d" class="muted tw-font-mono tw-text-text " rel="nofollow">65f1bf27bc</a>
3636 </div>
3737 <table class="file-view">
3838 <tbody><tr>
@@ -52,14 +52,14 @@ func TestRenderHelperCodePreview(t *testing.T) {
5252 OwnerName : "user2" ,
5353 RepoName : "repo1" ,
5454 CommitID : "65f1bf27bc3bf70f64657658635e66094edbcb4d" ,
55- FilePath : "/ README.md" ,
55+ FilePath : "README.md" ,
5656 LineStart : 1 ,
5757 })
5858 assert .NoError (t , err )
5959 assert .Equal (t , `<div class="code-preview-container file-content">
6060 <div class="code-preview-header">
61- <a href="http://full" class="muted " rel="nofollow">/README.md</a>
62- repo.code_preview_line_in:1,<a href="/user2/repo1/src/ commit/65f1bf27bc3bf70f64657658635e66094edbcb4d" rel="nofollow">65f1bf27bc</a>
61+ <a href="http://full" class="tw-font-semibold " rel="nofollow">repo1 /README.md</a>
62+ repo.code_preview_line_in:1,<a href="/user2/repo1/commit/65f1bf27bc3bf70f64657658635e66094edbcb4d" class="muted tw-font-mono tw-text-text " rel="nofollow">65f1bf27bc</a>
6363 </div>
6464 <table class="file-view">
6565 <tbody><tr>
@@ -76,7 +76,7 @@ func TestRenderHelperCodePreview(t *testing.T) {
7676 OwnerName : "user15" ,
7777 RepoName : "big_test_private_1" ,
7878 CommitID : "65f1bf27bc3bf70f64657658635e66094edbcb4d" ,
79- FilePath : "/ README.md" ,
79+ FilePath : "README.md" ,
8080 LineStart : 1 ,
8181 LineStop : 10 ,
8282 })
0 commit comments