diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 4f6c70a32..96fdc28b4 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -93,18 +93,25 @@ {{range $j, $section := $file.Sections}} {{range $k, $line := $section.Lines}} - - {{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}} - - -
{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
- - - {{if $line.RightIdx}}{{$line.RightIdx}}{{end}} - - -
{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
- + {{if eq .GetType 4}} + + +
{{$section.GetComputedInlineDiffFor $line}}
+ + {{else}} + + {{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}} + + +
{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
+ + + {{if $line.RightIdx}}{{$line.RightIdx}}{{end}} + + +
{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
+ + {{end}} {{end}} {{end}} diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl index f5ea81f17..619f97cfc 100644 --- a/templates/repo/diff/section_unified.tmpl +++ b/templates/repo/diff/section_unified.tmpl @@ -19,7 +19,7 @@ {{end}} {{end}} - +
{{$section.GetComputedInlineDiffFor $line}}