{{$file := .file}} {{range $j, $section := $file.Sections}} {{range $k, $line := $section.Lines}} {{if eq .GetType 4}} {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5) }} {{svg "octicon-fold-down"}} {{end}} {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4) }} {{svg "octicon-fold-up"}} {{end}} {{if eq $line.GetExpandDirection 2}} {{svg "octicon-fold"}} {{end}} {{$section.GetComputedInlineDiffFor $line}} {{else}} {{if $line.LeftIdx}}{{end}} {{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 2))}}{{svg "octicon-plus"}}{{end}}{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}} {{if $line.RightIdx}}{{end}} {{if and $.root.SignedUserID $.root.PageIsPullFiles (not (eq .GetType 3))}}{{svg "octicon-plus"}}{{end}}{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}} {{end}} {{if gt (len $line.Comments) 0}} {{if eq $line.GetCommentSide "previous"}} {{template "repo/diff/conversation" mergeinto $.root "comments" $line.Comments}} {{end}} {{if eq $line.GetCommentSide "proposed"}} {{template "repo/diff/conversation" mergeinto $.root "comments" $line.Comments}} {{end}} {{end}} {{end}} {{end}}