Skip to content

Commit ccd797a

Browse files
chore: fixed the tmpl lint issues
1 parent a03abb5 commit ccd797a

File tree

3 files changed

+120
-116
lines changed

3 files changed

+120
-116
lines changed

templates/repo/diff/blob_excerpt.tmpl

+77-73
Original file line numberDiff line numberDiff line change
@@ -5,44 +5,44 @@
55
{{if eq .GetType 4}}
66
{{$expandDirection := $line.GetExpandDirection}}
77
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}">
8-
<div class="lines-comment">
9-
<div>
10-
{{if $line.SectionInfo.HasComments}}
11-
<button>
12-
{{svg "octicon-comment-discussion"}}
13-
</button>
14-
{{end}}
15-
</div>
16-
<div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}">
17-
{{if or (eq $expandDirection 3) (eq $expandDirection 5)}}
18-
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.PageIsWiki}}&pull={{$.PageIsPullFiles}}&anchor={{$.Anchor}}&file_name={{$.section.FileName}}">
19-
{{svg "octicon-fold-down"}}
20-
</button>
21-
{{end}}
22-
{{if or (eq $expandDirection 3) (eq $expandDirection 4)}}
23-
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.PageIsWiki}}&pull={{$.PageIsPullFiles}}&anchor={{$.Anchor}}&file_name={{$.section.FileName}}">
24-
{{svg "octicon-fold-up"}}
25-
</button>
26-
{{end}}
27-
{{if eq $expandDirection 2}}
28-
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=&wiki={{$.PageIsWiki}}&pull={{$.PageIsPullFiles}}&anchor={{$.Anchor}}&file_name={{$.section.FileName}}">
29-
{{svg "octicon-fold"}}
30-
</button>
31-
{{end}}
32-
</div>
33-
</div>
34-
</td>
8+
<div class="lines-comment">
9+
<div>
10+
{{if $line.SectionInfo.HasComments}}
11+
<button>
12+
{{svg "octicon-comment-discussion"}}
13+
</button>
14+
{{end}}
15+
</div>
16+
<div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}">
17+
{{if or (eq $expandDirection 3) (eq $expandDirection 5)}}
18+
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.PageIsWiki}}&pull={{$.PageIsPullFiles}}&anchor={{$.Anchor}}&file_name={{$.section.FileName}}">
19+
{{svg "octicon-fold-down"}}
20+
</button>
21+
{{end}}
22+
{{if or (eq $expandDirection 3) (eq $expandDirection 4)}}
23+
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.PageIsWiki}}&pull={{$.PageIsPullFiles}}&anchor={{$.Anchor}}&file_name={{$.section.FileName}}">
24+
{{svg "octicon-fold-up"}}
25+
</button>
26+
{{end}}
27+
{{if eq $expandDirection 2}}
28+
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=&wiki={{$.PageIsWiki}}&pull={{$.PageIsPullFiles}}&anchor={{$.Anchor}}&file_name={{$.section.FileName}}">
29+
{{svg "octicon-fold"}}
30+
</button>
31+
{{end}}
32+
</div>
33+
</div>
34+
</td>
3535
<td colspan="7" class="lines-code lines-code-old ">{{$inlineDiff := $.section.GetComputedInlineDiffFor $line ctx.Locale}}{{/*
3636
*/}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}</td>
3737
{{else}}
3838
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$.FileNameHash}}L{{$line.LeftIdx}}{{end}}"></span></td>
3939
<td class="lines-escape lines-escape-old">{{if and $line.LeftIdx $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}</td>
4040
<td class="lines-type-marker lines-type-marker-old">{{if $line.LeftIdx}}<span class="tw-font-mono" data-type-marker=""></span>{{end}}</td>
4141
<td class="lines-code lines-code-old">{{/*
42-
*/}}{{if and $.SignedUserID $.PageIsPullFiles}}{{/*
42+
*/}}{{if and $.SignedUserID $.PageIsPullFiles}}{{/*
4343
*/}}<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}{{if (not $line.CanComment)}} tw-invisible{{end}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">{{/*
4444
*/}}{{svg "octicon-plus"}}{{/*
45-
*/}}</button>{{/*
45+
*/}}</button>{{/*
4646
*/}}{{end}}{{/*
4747
*/}}{{if $line.LeftIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{else}}{{/*
4848
*/}}<code class="code-inner"></code>{{/*
@@ -52,10 +52,10 @@
5252
<td class="lines-escape lines-escape-new">{{if and $line.RightIdx $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}</td>
5353
<td class="lines-type-marker lines-type-marker-new">{{if $line.RightIdx}}<span class="tw-font-mono" data-type-marker=""></span>{{end}}</td>
5454
<td class="lines-code lines-code-new">{{/*
55-
*/}}{{if and $.SignedUserID $.PageIsPullFiles}}{{/*
55+
*/}}{{if and $.SignedUserID $.PageIsPullFiles}}{{/*
5656
*/}}<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}{{if (not $line.CanComment)}} tw-invisible{{end}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">{{/*
5757
*/}}{{svg "octicon-plus"}}{{/*
58-
*/}}</button>{{/*
58+
*/}}</button>{{/*
5959
*/}}{{end}}{{/*
6060
*/}}{{if $line.RightIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{else}}{{/*
6161
*/}}<code class="code-inner"></code>{{/*
@@ -64,12 +64,12 @@
6464
{{end}}
6565
</tr>
6666
{{if $line.Comments}}
67-
<tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}">
68-
<td class="add-comment-right" colspan="5">
69-
{{template "repo/diff/conversation" dict "." $ "comments" $line.Comments}}}
70-
</td>
71-
</tr>
72-
{{end}}
67+
<tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}">
68+
<td class="add-comment-right" colspan="5">
69+
{{template "repo/diff/conversation" dict "." $ "comments" $line.Comments}}}
70+
</td>
71+
</tr>
72+
{{end}}
7373
{{end}}
7474
{{else}}
7575
{{range $k, $line := $.section.Lines}}
@@ -78,32 +78,32 @@
7878
{{if eq .GetType 4}}
7979
{{$expandDirection := $line.GetExpandDirection}}
8080
<td colspan="2" class="lines-num">
81-
<div class="lines-comment">
82-
<div>
83-
{{if $line.SectionInfo.HasComments}}
84-
<button>
85-
{{svg "octicon-comment-discussion"}}
86-
</button>
87-
{{end}}
88-
</div>
89-
<div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}">
90-
{{if or (eq $expandDirection 3) (eq $expandDirection 5)}}
91-
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.PageIsWiki}}&pull={{$.PageIsPullFiles}}&anchor={{$.Anchor}}&file_name={{$.section.FileName}}">
92-
{{svg "octicon-fold-down"}}
93-
</button>
94-
{{end}}
95-
{{if or (eq $expandDirection 3) (eq $expandDirection 4)}}
96-
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=up&wiki={{$.PageIsWiki}}&pull={{$.PageIsPullFiles}}&anchor={{$.Anchor}}&file_name={{$.section.FileName}}">
97-
{{svg "octicon-fold-up"}}
98-
</button>
99-
{{end}}
100-
{{if eq $expandDirection 2}}
101-
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=&wiki={{$.PageIsWiki}}&pull={{$.PageIsPullFiles}}&anchor={{$.Anchor}}&file_name={{$.section.FileName}}">
102-
{{svg "octicon-fold"}}
103-
</button>
104-
{{end}}
81+
<div class="lines-comment">
82+
<div>
83+
{{if $line.SectionInfo.HasComments}}
84+
<button>
85+
{{svg "octicon-comment-discussion"}}
86+
</button>
87+
{{end}}
88+
</div>
89+
<div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}">
90+
{{if or (eq $expandDirection 3) (eq $expandDirection 5)}}
91+
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.PageIsWiki}}&pull={{$.PageIsPullFiles}}&anchor={{$.Anchor}}&file_name={{$.section.FileName}}">
92+
{{svg "octicon-fold-down"}}
93+
</button>
94+
{{end}}
95+
{{if or (eq $expandDirection 3) (eq $expandDirection 4)}}
96+
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=up&wiki={{$.PageIsWiki}}&pull={{$.PageIsPullFiles}}&anchor={{$.Anchor}}&file_name={{$.section.FileName}}">
97+
{{svg "octicon-fold-up"}}
98+
</button>
99+
{{end}}
100+
{{if eq $expandDirection 2}}
101+
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=&wiki={{$.PageIsWiki}}&pull={{$.PageIsPullFiles}}&anchor={{$.Anchor}}&file_name={{$.section.FileName}}">
102+
{{svg "octicon-fold"}}
103+
</button>
104+
{{end}}
105+
</div>
105106
</div>
106-
</div>
107107
</td>
108108
{{else}}
109109
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"><span rel="{{if $line.LeftIdx}}diff-{{$.FileNameHash}}L{{$line.LeftIdx}}{{end}}"></span></td>
@@ -112,18 +112,22 @@
112112
<td class="lines-escape">{{if $inlineDiff.EscapeStatus.Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"></button>{{end}}</td>
113113
<td class="lines-type-marker"><span class="tw-font-mono" data-type-marker="{{$line.GetLineTypeMarker}}"></span></td>
114114
<td class="lines-code{{if (not $line.RightIdx)}} lines-code-old{{end}}">
115-
{{if and $.SignedUserID $.PageIsPullFiles}}
116-
<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}{{if (not $line.CanComment)}} tw-invisible{{end}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">{{svg "octicon-plus"}}
117-
</button>
118-
{{end}}
119-
<code {{if $inlineDiff.EscapeStatus.Escaped}}class="code-inner has-escaped" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"{{else}}class="code-inner"{{end}}>{{$inlineDiff.Content}}</code></td>
115+
{{if and $.SignedUserID $.PageIsPullFiles}}
116+
<button type="button" aria-label="{{ctx.Locale.Tr "repo.diff.comment.add_line_comment"}}" class="ui primary button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}{{if (not $line.CanComment)}} tw-invisible{{end}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">
117+
{{svg "octicon-plus"}}
118+
</button>
119+
{{end}}
120+
<code {{if $inlineDiff.EscapeStatus.Escaped}}class="code-inner has-escaped" title="{{template "repo/diff/escape_title" dict "diff" $inlineDiff}}"{{else}}class="code-inner"{{end}}>
121+
{{$inlineDiff.Content}}
122+
</code>
123+
</td>
120124
</tr>
121125
{{if $line.Comments}}
122-
<tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}">
123-
<td class="add-comment-right" colspan="5">
124-
{{template "repo/diff/conversation" dict "." $ "comments" $line.Comments}}
125-
</td>
126-
</tr>
127-
{{end}}
126+
<tr class="add-comment" data-line-type="{{.GetHTMLDiffLineType}}">
127+
<td class="add-comment-right" colspan="5">
128+
{{template "repo/diff/conversation" dict "." $ "comments" $line.Comments}}
129+
</td>
130+
</tr>
131+
{{end}}
128132
{{end}}
129133
{{end}}

templates/repo/diff/section_split.tmpl

+20-20
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,28 @@
2020
<td class="lines-num lines-num-old">
2121
<div class="lines-comment">
2222
<div>
23-
{{if $line.SectionInfo.HasComments}}
24-
<button>
25-
{{svg "octicon-comment-discussion"}}
26-
</button>
27-
{{end}}
23+
{{if $line.SectionInfo.HasComments}}
24+
<button>
25+
{{svg "octicon-comment-discussion"}}
26+
</button>
27+
{{end}}
2828
</div>
2929
<div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}">
30-
{{if or (eq $expandDirection 3) (eq $expandDirection 5)}}
31-
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.root.PageIsWiki}}&pull={{$.root.PageIsPullFiles}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}&file_name={{$section.FileName}}">
32-
{{svg "octicon-fold-down"}}
33-
</button>
34-
{{end}}
35-
{{if or (eq $expandDirection 3) (eq $expandDirection 4)}}
36-
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.root.PageIsWiki}}&pull={{$.root.PageIsPullFiles}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}&file_name={{$section.FileName}}">
37-
{{svg "octicon-fold-up"}}
38-
</button>
39-
{{end}}
40-
{{if eq $expandDirection 2}}
41-
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=&wiki={{$.root.PageIsWiki}}&pull={{$.root.PageIsPullFiles}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}&file_name={{$section.FileName}}">
42-
{{svg "octicon-fold"}}
43-
</button>
44-
{{end}}
30+
{{if or (eq $expandDirection 3) (eq $expandDirection 5)}}
31+
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.root.PageIsWiki}}&pull={{$.root.PageIsPullFiles}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}&file_name={{$section.FileName}}">
32+
{{svg "octicon-fold-down"}}
33+
</button>
34+
{{end}}
35+
{{if or (eq $expandDirection 3) (eq $expandDirection 4)}}
36+
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.root.PageIsWiki}}&pull={{$.root.PageIsPullFiles}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}&file_name={{$section.FileName}}">
37+
{{svg "octicon-fold-up"}}
38+
</button>
39+
{{end}}
40+
{{if eq $expandDirection 2}}
41+
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=&wiki={{$.root.PageIsWiki}}&pull={{$.root.PageIsPullFiles}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}&file_name={{$section.FileName}}">
42+
{{svg "octicon-fold"}}
43+
</button>
44+
{{end}}
4545
</div>
4646
</div>
4747
</td>{{$inlineDiff := $section.GetComputedInlineDiffFor $line ctx.Locale}}

templates/repo/diff/section_unified.tmpl

+23-23
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,32 @@
1313
{{if eq .GetType 4}}
1414
{{if $.root.AfterCommitID}}
1515
{{$expandDirection := $line.GetExpandDirection}}
16-
<td colspan="2" class="lines-num">
16+
<td colspan="2" class="lines-num">
1717
<div class="lines-comment">
1818
<div>
19-
{{if $line.SectionInfo.HasComments}}
20-
<button>
21-
{{svg "octicon-comment-discussion"}}
22-
</button>
23-
{{end}}
19+
{{if $line.SectionInfo.HasComments}}
20+
<button>
21+
{{svg "octicon-comment-discussion"}}
22+
</button>
23+
{{end}}
24+
</div>
25+
<div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}">
26+
{{if or (eq $expandDirection 3) (eq $expandDirection 5)}}
27+
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.root.PageIsWiki}}&pull={{$.root.PageIsPullFiles}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}&file_name={{$section.FileName}}">
28+
{{svg "octicon-fold-down"}}
29+
</button>
30+
{{end}}
31+
{{if or (eq $expandDirection 3) (eq $expandDirection 4)}}
32+
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=up&wiki={{$.root.PageIsWiki}}&pull={{$.root.PageIsPullFiles}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}&file_name={{$section.FileName}}">
33+
{{svg "octicon-fold-up"}}
34+
</button>
35+
{{end}}
36+
{{if eq $expandDirection 2}}
37+
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=&wiki={{$.root.PageIsWiki}}&pull={{$.root.PageIsPullFiles}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}&file_name={{$section.FileName}}">
38+
{{svg "octicon-fold"}}
39+
</button>
40+
{{end}}
2441
</div>
25-
<div class="code-expander-buttons" data-expand-direction="{{$expandDirection}}">
26-
{{if or (eq $expandDirection 3) (eq $expandDirection 5)}}
27-
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.root.PageIsWiki}}&pull={{$.root.PageIsPullFiles}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}&file_name={{$section.FileName}}">
28-
{{svg "octicon-fold-down"}}
29-
</button>
30-
{{end}}
31-
{{if or (eq $expandDirection 3) (eq $expandDirection 4)}}
32-
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=up&wiki={{$.root.PageIsWiki}}&pull={{$.root.PageIsPullFiles}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}&file_name={{$section.FileName}}">
33-
{{svg "octicon-fold-up"}}
34-
</button>
35-
{{end}}
36-
{{if eq $expandDirection 2}}
37-
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=&wiki={{$.root.PageIsWiki}}&pull={{$.root.PageIsPullFiles}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}&file_name={{$section.FileName}}">
38-
{{svg "octicon-fold"}}
39-
</button>
40-
{{end}}
41-
</div>
4242
</div>
4343
</td>
4444
{{else}}

0 commit comments

Comments
 (0)