{{- if .FileError}}
{{.FileError}}
{{end}}

{{if .ReadmeInList}} {{svg "octicon-book" 16 "mr-3"}} {{.FileName}} {{else}}
{{if .FileIsSymlink}}
{{.locale.Tr "repo.symbolic_link"}}
{{end}} {{if .NumLinesSet}}
{{.NumLines}} {{.locale.TrN .NumLines "repo.line" "repo.lines"}}
{{end}} {{if .FileSize}}
{{FileSize .FileSize}}{{if .IsLFSFile}} ({{.locale.Tr "repo.stored_lfs"}}){{end}}
{{end}} {{if .LFSLock}}
{{svg "octicon-lock" 16 "mr-2"}} {{.LFSLockOwner}}
{{end}}
{{end}}
{{if .HasSourceRenderedToggle}} {{end}} {{if not .ReadmeInList}} {{svg "octicon-download"}} {{if or .IsMarkup .IsRenderedHTML (not .IsTextSource)}} {{svg "octicon-copy" 14}} {{else}} {{svg "octicon-copy" 14}} {{end}} {{if .Repository.CanEnableEditor}} {{if .CanEditFile}} {{svg "octicon-pencil"}} {{else}} {{svg "octicon-pencil"}} {{end}} {{if .CanDeleteFile}} {{svg "octicon-trash"}} {{else}} {{svg "octicon-trash"}} {{end}} {{end}} {{else if .EscapeStatus.Escaped}} {{.locale.Tr "repo.escape_control_characters"}} {{end}}

{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
{{if .IsMarkup}} {{if .FileContent}}{{.FileContent | Safe}}{{end}} {{else if .IsRenderedHTML}}
{{if .FileContent}}{{.FileContent | Str2html}}{{end}}
{{else if not .IsTextSource}}
{{if .IsImageFile}} {{else if .IsVideoFile}} {{else if .IsAudioFile}} {{else if .IsPDFFile}} {{else}} {{.locale.Tr "repo.file_view_raw"}} {{end}}
{{else if .FileSize}} {{if .IsFileTooLarge}}
{{.locale.Tr "repo.file_too_large"}}
{{else}} {{range $idx, $code := .FileContent}} {{$line := Add $idx 1}} {{if $.EscapeStatus.Escaped}} {{end}} {{end}}
{{if (index $.LineEscapeStatus $idx).Escaped}}{{end}}{{$code | Safe}}
{{end}} {{end}}