summaryrefslogtreecommitdiffstats
path: root/templates/repo/diff.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/diff.tmpl')
-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 443e002d59..f261da55a0 100644
--- a/templates/repo/diff.tmpl
+++ b/templates/repo/diff.tmpl
@@ -105,14 +105,14 @@
{{else}}
<table>
<tbody>
- {{range $j, $section := $file.Sections}}
- {{range $k, $line := $section.Lines}}
- <tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$i}} ol-{{$i}}">
+ {{range .Sections}}
+ {{range $k, $line := .Lines}}
+ <tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}">
<td class="lines-num lines-num-old">
- <span rel="diff-{{Add $i 1}}L{{$j}}{{$k}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
+ <span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
</td>
<td class="lines-num lines-num-new">
- <span rel="diff-{{Add $i 1}}L{{$j}}{{$k}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span>
+ <span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span>
</td>
<td class="lines-code">