From 48cf9edcf5652217e986445d83f9f29624e4f377 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Thu, 23 Feb 2017 13:24:59 -0500 Subject: [PATCH] templates/repo/diff: fix tag-code doesn't display in split view --- templates/repo/diff/box.tmpl | 31 +++++++++++++++--------- templates/repo/diff/section_unified.tmpl | 2 +- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 4f6c70a3..96fdc28b 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 f5ea81f1..619f97cf 100644 --- a/templates/repo/diff/section_unified.tmpl +++ b/templates/repo/diff/section_unified.tmpl @@ -19,7 +19,7 @@ {{end}} {{end}} - +
{{$section.GetComputedInlineDiffFor $line}}