{{$file := .file}} {{range $j, $section := $file.Sections}} {{range $k, $line := $section.Lines}} {{$hasmatch := ne $line.Match -1}} {{if or (ne .GetType 2) (not $hasmatch)}} {{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}} {{if $inlineDiff.EscapeStatus.Escaped}}{{end}} {{/* */}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/* */}} {{else if and (eq .GetType 3) $hasmatch}}{{/* DEL */}} {{$match := index $section.Lines $line.Match}} {{- $leftDiff := ""}}{{if $line.LeftIdx}}{{$leftDiff = $section.GetComputedInlineDiffFor $line ctx.Locale}}{{end}} {{- $rightDiff := ""}}{{if $match.RightIdx}}{{$rightDiff = $section.GetComputedInlineDiffFor $match ctx.Locale}}{{end}} {{if $line.LeftIdx}}{{if $leftDiff.EscapeStatus.Escaped}}{{end}}{{end}} {{/* */}}{{if and $.root.SignedUserID $.root.PageIsPullFiles}}{{/* */}}{{/* */}}{{end}}{{/* */}}{{if $line.LeftIdx}}{{/* */}}{{template "repo/diff/section_code" dict "diff" $leftDiff}}{{/* */}}{{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}}{{/* */}}{{template "repo/diff/section_code" dict "diff" $rightDiff}}{{/* */}}{{else}}{{/* */}}{{/* */}}{{end}}{{/* */}} {{else}} {{$inlineDiff := $section.GetComputedInlineDiffFor $line ctx.Locale}} {{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}}{{/* */}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/* */}}{{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}}{{/* */}}{{template "repo/diff/section_code" dict "diff" $inlineDiff}}{{/* */}}{{else}}{{/* */}}{{/* */}}{{end}}{{/* */}} {{end}} {{if and (eq .GetType 3) $hasmatch}} {{$match := index $section.Lines $line.Match}} {{if or $line.Comments $match.Comments}} {{if $line.Comments}} {{if eq $line.GetCommentSide "previous"}} {{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}} {{end}} {{end}} {{if $match.Comments}} {{if eq $match.GetCommentSide "previous"}} {{template "repo/diff/conversation" dict "." $.root "comments" $match.Comments}} {{end}} {{end}} {{if $line.Comments}} {{if eq $line.GetCommentSide "proposed"}} {{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}} {{end}} {{end}} {{if $match.Comments}} {{if eq $match.GetCommentSide "proposed"}} {{template "repo/diff/conversation" dict "." $.root "comments" $match.Comments}} {{end}} {{end}} {{end}} {{else if $line.Comments}} {{if eq $line.GetCommentSide "previous"}} {{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}} {{end}} {{if eq $line.GetCommentSide "proposed"}} {{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}} {{end}} {{end}} {{end}} {{end}} {{end}}