2016-08-28 04:31:42 -07:00
|
|
|
{{$file := .}}
|
2017-04-04 01:45:57 -04:00
|
|
|
{{$highlightClass := $file.HighlightClass}}
|
2016-08-28 04:31:42 -07:00
|
|
|
{{range $j, $section := $file.Sections}}
|
|
|
|
|
{{range $k, $line := $section.Lines}}
|
2020-03-08 19:09:31 +08:00
|
|
|
<tr class="{{DiffLineTypeToStr .Type}}-code nl-{{$k}} ol-{{$k}}">
|
|
|
|
|
{{if eq .Type 4}}
|
2017-07-14 16:50:49 -04:00
|
|
|
<td colspan="2" class="lines-num">
|
|
|
|
|
{{/* {{if gt $j 0}}<span class="fold octicon octicon-fold"></span>{{end}} */}}
|
|
|
|
|
</td>
|
2016-08-28 04:31:42 -07:00
|
|
|
{{else}}
|
2020-03-08 19:09:31 +08:00
|
|
|
<td class="lines-num lines-num-old" {{if $line.LeftLine}} id="diff-{{$file.Index}}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>
|
2016-08-28 04:31:42 -07:00
|
|
|
{{end}}
|
2017-02-23 13:24:59 -05:00
|
|
|
<td class="lines-code">
|
2017-04-04 01:45:57 -04:00
|
|
|
<pre><code class="{{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.ComputedInlineDiffFor $line}}</code></pre>
|
2016-08-28 04:31:42 -07:00
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
{{end}}
|
2020-03-08 19:09:31 +08:00
|
|
|
{{end}}
|