From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.3. Signed-off-by: Daniel Baumann --- templates/repo/diff/blob_excerpt.tmpl | 80 +++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 templates/repo/diff/blob_excerpt.tmpl (limited to 'templates/repo/diff/blob_excerpt.tmpl') diff --git a/templates/repo/diff/blob_excerpt.tmpl b/templates/repo/diff/blob_excerpt.tmpl new file mode 100644 index 0000000..d6ab87f --- /dev/null +++ b/templates/repo/diff/blob_excerpt.tmpl @@ -0,0 +1,80 @@ +{{if $.IsSplitStyle}} + {{range $k, $line := $.section.Lines}} + + {{if eq .GetType 4}} + +
+ {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} + + {{end}} + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}} + + {{end}} + {{if eq $line.GetExpandDirection 2}} + + {{end}} +
+ + {{$inlineDiff := $.section.GetComputedInlineDiffFor $line ctx.Locale}}{{/* + */}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}} + {{else}} + {{$inlineDiff := $.section.GetComputedInlineDiffFor $line ctx.Locale}} + + {{if and $line.LeftIdx $inlineDiff.EscapeStatus.Escaped}}{{end}} + {{if $line.LeftIdx}}{{end}} + {{/* + */}}{{if $line.LeftIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{else}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}} + + {{if and $line.RightIdx $inlineDiff.EscapeStatus.Escaped}}{{end}} + {{if $line.RightIdx}}{{end}} + {{/* + */}}{{if $line.RightIdx}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{else}}{{/* + */}}{{/* + */}}{{end}}{{/* + */}} + {{end}} + + {{end}} +{{else}} + {{range $k, $line := $.section.Lines}} + + {{if eq .GetType 4}} + +
+ {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} + + {{end}} + {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}} + + {{end}} + {{if eq $line.GetExpandDirection 2}} + + {{end}} +
+ + {{else}} + + + {{end}} + {{$inlineDiff := $.section.GetComputedInlineDiffFor $line ctx.Locale}} + {{if $inlineDiff.EscapeStatus.Escaped}}{{end}} + + {{$inlineDiff.Content}} + + {{end}} +{{end}} -- cgit v1.2.3