Backport #29260 by @yp05327 Fix #29136 Before: The result is a table and all line numbers are all in one row.   After:   ~~Updated:~~ ~~added `active` class to the target line.~~  Co-authored-by: yp05327 <576951401@qq.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> (cherry picked from commit 9db426ad8c7122633fa3e31a427fd1e65ddad334)
14 lines
451 B
Go HTML Template
14 lines
451 B
Go HTML Template
<div class="file-body file-code code-view">
|
|
<table>
|
|
<tbody>
|
|
{{range .SearchResult.Lines}}
|
|
<tr>
|
|
<td class="lines-num">
|
|
<a href="{{$.RepoLink}}/src/commit/{{PathEscape $.SearchResult.CommitID}}/{{PathEscapeSegments $.SearchResult.Filename}}#L{{.Num}}"><span>{{.Num}}</span></a>
|
|
</td>
|
|
<td class="lines-code chroma"><code class="code-inner">{{.FormattedContent}}</code></td>
|
|
</tr>
|
|
{{end}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|