1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

fix diff lines highlighting

This commit is contained in:
Alexey Makhov
2015-02-03 23:53:34 +03:00
parent 5589445557
commit 7f71fe9dae
3 changed files with 22 additions and 12 deletions

View File

@@ -102,17 +102,17 @@
<table>
<tbody>
{{range .Sections}}
{{range .Lines}}
<tr class="{{DiffLineTypeToStr .Type}}-code nl-1 ol-1">
{{range $i, $line := .Lines}}
<tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$i}} ol-{{$i}}">
<td class="lines-num lines-num-old">
<span rel="L1">{{if .LeftIdx}}{{.LeftIdx}}{{end}}</span>
<span rel="L{{$i}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
</td>
<td class="lines-num lines-num-new">
<span rel="L1">{{if .RightIdx}}{{.RightIdx}}{{end}}</span>
<span rel="L{{$i}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span>
</td>
<td class="lines-code">
<pre>{{.Content}}</pre>
<pre>{{$line.Content}}</pre>
</td>
</tr>
{{end}}