mirror of https://github.com/gogs/gogs.git
20 lines
921 B
Cheetah
20 lines
921 B
Cheetah
{{$file := .}}
|
|
{{$highlightClass := $file.HighlightClass}}
|
|
{{range $j, $section := $file.Sections}}
|
|
{{range $k, $line := $section.Lines}}
|
|
<tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}">
|
|
{{if eq .Type 4}}
|
|
<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.LeftLine}} id="diff-{{$file.OldIndex}}L{{$line.LeftLine}}" data-line-number="{{$line.LeftLine}}"{{end}}></td>
|
|
<td class="lines-num lines-num-new" {{if $line.RightLine}} id="diff-{{$file.Index}}R{{$line.RightLine}}" data-line-number="{{$line.RightLine}}"{{end}}></td>
|
|
{{end}}
|
|
<td class="lines-code">
|
|
<pre><code class="{{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.ComputedInlineDiffFor $line}}</code></pre>
|
|
</td>
|
|
</tr>
|
|
{{end}}
|
|
{{end}}
|