{{$file := .file}} {{/* this tmpl is also used by the PR Conversation page, so the "AfterCommitID" and "DiffBlobExcerptData" may not exist */}} {{$diffBlobExcerptData := $.root.DiffBlobExcerptData}} {{range $j, $section := $file.Sections}} {{range $k, $line := $section.Lines}} {{if eq .GetType 4}} {{if $.root.AfterCommitID}} {{$line.RenderBlobExcerptButtons $file.NameHash $diffBlobExcerptData}} {{else}} {{/* for code file preview page or comment diffs on pull comment pages, do not show the expansion arrows */}} {{end}} {{else}} {{end}} {{$inlineDiff := $section.GetComputedInlineDiffFor $line ctx.Locale -}} {{- if $inlineDiff.EscapeStatus.Escaped -}} {{- end -}} {{if eq .GetType 4}} {{template "repo/diff/section_code" dict "diff" $inlineDiff}} {{else}} {{- if and $.root.SignedUserID $.root.PageIsPullFiles -}} {{- end -}} {{- template "repo/diff/section_code" dict "diff" $inlineDiff -}} {{end}} {{if $line.Comments}} {{template "repo/diff/conversation" dict "." $.root "comments" $line.Comments}} {{end}} {{end}} {{end}}