diff options
author | Unknwon <u@gogs.io> | 2017-07-14 17:02:45 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-07-14 17:02:45 -0400 |
commit | f67d6bbca3bbba7a0614b7f9b8ab3c24d4a318aa (patch) | |
tree | fffaeab680b64ff6003a38d3e7a2a3bfc78b9ed3 /templates/repo | |
parent | c970c4ee41bc98515ed37a92dfc7dbe125e213e1 (diff) |
repo/diff: fix line number in split view template (#4584)
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/diff/box.tmpl | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 78237877..33ce604d 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -99,14 +99,12 @@ <pre><code class="{{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.ComputedInlineDiffFor $line}}</code></pre> </td> {{else}} - <td class="lines-num lines-num-old"> - <span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span> + <td class="lines-num lines-num-old" {{if $line.LeftIdx}} id="diff-{{Sha1 $file.Index}}L{{$line.LeftIdx}}" data-line-number="{{$line.LeftIdx}}"{{end}}> </td> <td class="lines-code halfwidth"> <pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.LeftIdx}}{{$section.ComputedInlineDiffFor $line}}{{end}}</code></pre> </td> - <td class="lines-num lines-num-new"> - <span rel="{{if $line.RightIdx}}diff-{{Sha1 $file.Name}}R{{$line.RightIdx}}{{end}}">{{if $line.RightIdx}}{{$line.RightIdx}}{{end}}</span> + <td class="lines-num lines-num-new" {{if $line.RightIdx}} id="diff-{{Sha1 $file.Index}}R{{$line.RightIdx}}" data-line-number="{{$line.RightIdx}}"{{end}}> </td> <td class="lines-code halfwidth"> <pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.RightIdx}}{{$section.ComputedInlineDiffFor $line}}{{end}}</code></pre> |