diff options
author | Unknwon <u@gogs.io> | 2017-07-14 16:50:49 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-07-14 16:50:49 -0400 |
commit | c970c4ee41bc98515ed37a92dfc7dbe125e213e1 (patch) | |
tree | e9ae7c8b98c360bb836b368c2175637e8fc10f80 /templates/repo | |
parent | 3a6623104f7725905e2b14582579abea1590cec3 (diff) |
css: not include line numbers in diff selection (#4584)
Changed template file in order to make CSS work properly.
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/diff/section_unified.tmpl | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl index 0832d39f..d85ea49d 100644 --- a/templates/repo/diff/section_unified.tmpl +++ b/templates/repo/diff/section_unified.tmpl @@ -4,20 +4,12 @@ {{range $k, $line := $section.Lines}} <tr class="{{DiffLineTypeToStr .GetType}}-code nl-{{$k}} ol-{{$k}}"> {{if eq .GetType 4}} - <td colspan="2" class="lines-num"> - {{/* {{if gt $j 0}}<span class="fold octicon octicon-fold"></span>{{end}} */}} - </td> + <td colspan="2" class="lines-num"> + {{/* {{if gt $j 0}}<span class="fold octicon octicon-fold"></span>{{end}} */}} + </td> {{else}} - <td class="lines-num lines-num-old" {{if $line.LeftIdx}}id="diff-{{$file.Index}}L{{$line.LeftIdx}}"{{end}}> - {{if $line.LeftIdx}} - <span>{{$line.LeftIdx}}</span> - {{end}} - </td> - <td class="lines-num lines-num-new" {{if $line.RightIdx}}id="diff-{{$file.Index}}R{{$line.RightIdx}}"{{end}}> - {{if $line.RightIdx}} - <span>{{$line.RightIdx}}</span> - {{end}} - </td> + <td class="lines-num lines-num-old" {{if $line.LeftIdx}} id="diff-{{$file.Index}}L{{$line.LeftIdx}}" data-line-number="{{$line.LeftIdx}}"{{end}}></td> + <td class="lines-num lines-num-new" {{if $line.RightIdx}} id="diff-{{$file.Index}}R{{$line.RightIdx}}" data-line-number="{{$line.RightIdx}}"{{end}}></td> {{end}} <td class="lines-code"> <pre><code class="{{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.ComputedInlineDiffFor $line}}</code></pre> |