mirror of
https://github.com/go-gitea/gitea
synced 2025-02-21 20:22:17 +01:00
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>
15 lines
451 B
Handlebars
15 lines
451 B
Handlebars
<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>
|