aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/diff.tmpl10
1 files changed, 5 insertions, 5 deletions
diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl
index 80453516..8becb006 100644
--- a/templates/repo/diff.tmpl
+++ b/templates/repo/diff.tmpl
@@ -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}}