mirror of https://github.com/go-gitea/gitea.git
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>pull/29605/head^2
parent
a8277cfc8f
commit
9db426ad8c
@ -0,0 +1,14 @@
|
||||
<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>
|
||||
Loading…
Reference in New Issue