summaryrefslogtreecommitdiffstats
path: root/templates/repo/diff.tmpl
diff options
context:
space:
mode:
authorAlexey Makhov <makhov.alex@gmail.com>2015-02-19 00:52:22 +0300
committerAlexey Makhov <makhov.alex@gmail.com>2015-02-19 00:52:22 +0300
commit563e8b4ea98e57adf3992dcaef76b86d29c13cec (patch)
treec77d91a4b1cf6265d0bfce9490b23dfbae95ec40 /templates/repo/diff.tmpl
parentbe19fe48d70cd7ce3ec0d49e2b6f47f83f33ad2f (diff)
downloadgitea-563e8b4ea98e57adf3992dcaef76b86d29c13cec.tar.gz
gitea-563e8b4ea98e57adf3992dcaef76b86d29c13cec.zip
gitlab-like hash naming
Diffstat (limited to 'templates/repo/diff.tmpl')
-rw-r--r--templates/repo/diff.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo/diff.tmpl b/templates/repo/diff.tmpl
index 443e002d59..2bc5c7d7d7 100644
--- a/templates/repo/diff.tmpl
+++ b/templates/repo/diff.tmpl
@@ -106,13 +106,13 @@
<table>
<tbody>
{{range $j, $section := $file.Sections}}
- {{range $k, $line := $section.Lines}}
+ {{range $k, $line := $section.Lines}}
<tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$i}} ol-{{$i}}">
<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-L{{Sha1 $file.Name}}{{$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">