summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorAndrey Nering <andrey.nering@gmail.com>2016-01-27 18:54:08 -0200
committerAndrey Nering <andrey.nering@gmail.com>2016-01-27 18:54:08 -0200
commit5deb726f3fc5335b7391a28f6b21328b1335dd9e (patch)
tree03044e2fb9dfee8f6c8f77356d983936cceb105b /templates
parent93f40995b30b67e80e3fff36fe7e7ced756a13d8 (diff)
downloadgitea-5deb726f3fc5335b7391a28f6b21328b1335dd9e.tar.gz
gitea-5deb726f3fc5335b7391a28f6b21328b1335dd9e.zip
Refactoring of inline diff computing to prevent empty diff box. Fix #2489
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/diff_box.tmpl6
1 files changed, 3 insertions, 3 deletions
diff --git a/templates/repo/diff_box.tmpl b/templates/repo/diff_box.tmpl
index da512ebf0b..4ea531c3c5 100644
--- a/templates/repo/diff_box.tmpl
+++ b/templates/repo/diff_box.tmpl
@@ -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}}