Skip to content

Commit 69a6aa0

Browse files
committed
Run make fmt
1 parent ce9bfa2 commit 69a6aa0

File tree

1 file changed

+28
-28
lines changed

1 file changed

+28
-28
lines changed

modules/markup/html_test.go

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -695,8 +695,8 @@ func TestIsFullURL(t *testing.T) {
695695
func TestRender_FilePreview(t *testing.T) {
696696
setting.AppURL = markup.TestAppURL
697697
markup.Init(&markup.ProcessorHelper{
698-
GetRepoFileContent: func(ctx context.Context, ownerName string, repoName string, commitSha string, filePath string) ([]template.HTML, error) {
699-
buf := []byte( "A\nB\nC\nD\n" )
698+
GetRepoFileContent: func(ctx context.Context, ownerName, repoName, commitSha, filePath string) ([]template.HTML, error) {
699+
buf := []byte("A\nB\nC\nD\n")
700700
return highlight.PlainText(buf), nil
701701
},
702702
GetLocale: func(ctx context.Context) (translation.Locale, error) {
@@ -709,39 +709,39 @@ func TestRender_FilePreview(t *testing.T) {
709709

710710
test := func(input, expected string) {
711711
buffer, err := markup.RenderString(&markup.RenderContext{
712-
Ctx: git.DefaultContext,
712+
Ctx: git.DefaultContext,
713713
RelativePath: ".md",
714-
Metas: localMetas,
714+
Metas: localMetas,
715715
}, input)
716716
assert.NoError(t, err)
717717
assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer))
718718
}
719719

720720
test(
721721
commitFilePreview,
722-
`<p></p>` +
723-
`<div class="file-preview-box">` +
724-
`<div class="header">` +
725-
`<a href="http://localhost:3000/gogits/gogs/src/commit/b6dd6210eaebc915fd5be5579c58cce4da2e2579/path/to/file.go#L1-L2" class="muted" rel="nofollow">path/to/file.go</a>` +
726-
`<span class="text small grey">` +
727-
`Lines 1 to 2 in <a href="http://localhost:3000/gogits/gogs/src/commit/b6dd6210eaebc915fd5be5579c58cce4da2e2579" class="text black" rel="nofollow">b6dd621</a>` +
728-
`</span>` +
729-
`</div>` +
730-
`<div class="ui table">` +
731-
`<table class="file-preview">` +
732-
`<tbody>` +
733-
`<tr>` +
734-
`<td id="user-content-L1" class="lines-num"><span id="user-content-L1" data-line-number="1"></span></td>` +
735-
`<td rel="L1" class="lines-code chroma"><code class="code-inner">A` + "\n" + `</code></td>` +
736-
`</tr>` +
737-
`<tr>` +
738-
`<td id="user-content-L2" class="lines-num"><span id="user-content-L2" data-line-number="2"></span></td>` +
739-
`<td rel="L2" class="lines-code chroma"><code class="code-inner">B` + "\n" + `</code></td>` +
740-
`</tr>` +
741-
`</tbody>` +
742-
`</table>` +
743-
`</div>` +
744-
`</div>` +
745-
`<p></p>`,
722+
`<p></p>`+
723+
`<div class="file-preview-box">`+
724+
`<div class="header">`+
725+
`<a href="http://localhost:3000/gogits/gogs/src/commit/b6dd6210eaebc915fd5be5579c58cce4da2e2579/path/to/file.go#L1-L2" class="muted" rel="nofollow">path/to/file.go</a>`+
726+
`<span class="text small grey">`+
727+
`Lines 1 to 2 in <a href="http://localhost:3000/gogits/gogs/src/commit/b6dd6210eaebc915fd5be5579c58cce4da2e2579" class="text black" rel="nofollow">b6dd621</a>`+
728+
`</span>`+
729+
`</div>`+
730+
`<div class="ui table">`+
731+
`<table class="file-preview">`+
732+
`<tbody>`+
733+
`<tr>`+
734+
`<td id="user-content-L1" class="lines-num"><span id="user-content-L1" data-line-number="1"></span></td>`+
735+
`<td rel="L1" class="lines-code chroma"><code class="code-inner">A`+"\n"+`</code></td>`+
736+
`</tr>`+
737+
`<tr>`+
738+
`<td id="user-content-L2" class="lines-num"><span id="user-content-L2" data-line-number="2"></span></td>`+
739+
`<td rel="L2" class="lines-code chroma"><code class="code-inner">B`+"\n"+`</code></td>`+
740+
`</tr>`+
741+
`</tbody>`+
742+
`</table>`+
743+
`</div>`+
744+
`</div>`+
745+
`<p></p>`,
746746
)
747747
}

0 commit comments

Comments
 (0)