1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-09-15 18:56:59 +00:00

Refactoring of inline diff computing to prevent empty diff box. Fix #2489

This commit is contained in:
Andrey Nering 2016-01-27 18:54:08 -02:00
parent 93f40995b3
commit 5deb726f3f
4 changed files with 37 additions and 50 deletions

View file

@ -76,13 +76,13 @@
<span rel="{{if $line.LeftIdx}}diff-{{Sha1 $file.Name}}L{{$line.LeftIdx}}{{end}}">{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}</span>
</td>
<td class="lines-code halfwidth">
<pre class="wrap">{{if $line.LeftIdx}}{{$line.ParsedContent}}{{end}}</pre>
<pre class="wrap">{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</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>
<td class="lines-code halfwidth">
<pre class="wrap">{{if $line.RightIdx}}{{$line.ParsedContent}}{{end}}</pre>
<pre class="wrap">{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</pre>
</td>
</tr>
{{end}}
@ -104,7 +104,7 @@
</td>
{{end}}
<td class="lines-code">
<pre>{{$line.ParsedContent}}</pre>
<pre>{{$section.GetComputedInlineDiffFor $line}}</pre>
</td>
</tr>
{{end}}