{{if $file.IsIncomplete}}
diff --git a/templates/repo/diff/section_split.tmpl b/templates/repo/diff/section_split.tmpl
index 81223642db798..754f7cec10e0d 100644
--- a/templates/repo/diff/section_split.tmpl
+++ b/templates/repo/diff/section_split.tmpl
@@ -21,23 +21,75 @@
{{svg "octicon-fold"}}
{{end}}
-
-
{{$section.GetComputedInlineDiffFor $line}} |
+ {{$inlineDiff := $section.GetComputedInlineDiffFor $line}}
+
{{if $inlineDiff.EscapeStatus.Escaped}}{{end}} |
+
{{$inlineDiff.Content}} |
{{else if and (eq .GetType 3) $hasmatch}}{{/* DEL */}}
{{$match := index $section.Lines $line.Match}}
+ {{- $leftDiff := ""}}{{if $line.LeftIdx}}{{$leftDiff = $section.GetComputedInlineDiffFor $line}}{{end}}
+ {{- $rightDiff := ""}}{{if $match.RightIdx}}{{$rightDiff = $section.GetComputedInlineDiffFor $match}}{{end}}
|
+
{{if $line.LeftIdx}}{{if $leftDiff.EscapeStatus.Escaped}}{{end}}{{end}} |
|
-
{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{end}}{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}} |
+
{{/*
+ */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*
+ */}}{{/*
+ */}}{{end}}{{/*
+ */}}{{if $line.LeftIdx}}{{/*
+ */}}{{$leftDiff.Content}} {{/*
+ */}}{{else}}{{/*
+ */}} {{/*
+ */}}{{end}}{{/*
+ */}} |
|
+
{{if $match.RightIdx}}{{if $rightDiff.EscapeStatus.Escaped}}{{end}}{{end}} |
{{if $match.RightIdx}}{{end}} |
-
{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{end}}{{if $match.RightIdx}}{{$section.GetComputedInlineDiffFor $match}}{{end}} |
+
{{/*
+ */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/*
+ */}}{{/*
+ */}}{{end}}{{/*
+ */}}{{if $match.RightIdx}}{{/*
+ */}}{{$rightDiff.Content}} {{/*
+ */}}{{else}}{{/*
+ */}} {{/*
+ */}}{{end}}{{/*
+ */}} |
{{else}}
+ {{$inlineDiff := $section.GetComputedInlineDiffFor $line}}
|
+
{{if $line.LeftIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}{{end}}{{end}} |
{{if $line.LeftIdx}}{{end}} |
-
{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 2))}}{{end}}{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}} |
+
{{/*
+ */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 2))}}{{/*
+ */}}{{/*
+ */}}{{end}}{{/*
+ */}}{{if $line.LeftIdx}}{{/*
+ */}}{{$inlineDiff.Content}} {{/*
+ */}}{{else}}{{/*
+ */}} {{/*
+ */}}{{end}}{{/*
+ */}} |
|
+
{{if $line.RightIdx}}{{if $inlineDiff.EscapeStatus.Escaped}}{{end}}{{end}} |
{{if $line.RightIdx}}{{end}} |
-
{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 3))}}{{end}}{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}} |
+
{{/*
+ */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 3))}}{{/*
+ */}}{{/*
+ */}}{{end}}{{/*
+ */}}{{if $line.RightIdx}}{{/*
+ */}}{{$inlineDiff.Content}} {{/*
+ */}}{{else}}{{/*
+ */}} {{/*
+ */}}{{end}}{{/*
+ */}} |
{{end}}
{{if and (eq .GetType 3) $hasmatch}}
@@ -45,6 +97,7 @@
{{if or (gt (len $line.Comments) 0) (gt (len $match.Comments) 0)}}
{{if gt (len $line.Comments) 0}}