Skip to content

Show 🚫 on the last line when a file does not end with \n #27391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update templates/repo/view_file.tmpl
Co-authored-by: delvh <[email protected]>
  • Loading branch information
silverwind and delvh authored Oct 2, 2023
commit f8c778915d2769d1d7e434665e813c66d44f75a6
4 changes: 3 additions & 1 deletion templates/repo/view_file.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@
{{if $.EscapeStatus.Escaped}}
<td class="lines-escape">{{if (index $.LineEscapeStatus $idx).Escaped}}<button class="toggle-escape-button btn interact-bg" title="{{if (index $.LineEscapeStatus $idx).HasInvisible}}{{ctx.Locale.Tr "repo.invisible_runes_line"}} {{end}}{{if (index $.LineEscapeStatus $idx).HasAmbiguous}}{{ctx.Locale.Tr "repo.ambiguous_runes_line"}}{{end}}"></button>{{end}}</td>
{{end}}
<td rel="L{{$line}}" class="lines-code chroma"><code class="code-inner">{{$codeHTML}}</code>{{if $.FileContentLines.ShouldShowIncompleteMark $idx}}<span class="text red unselectable gt-ml-2">🚫</span>{{end}}</td>
<td rel="L{{$line}}" class="lines-code chroma"><code class="code-inner">{{$codeHTML}}</code>
{{- if $.FileContentLines.ShouldShowIncompleteMark $idx -}}<span class="text red unselectable gt-ml-2">🚫</span>{{- end -}}
</td>
</tr>
{{end}}
</tbody>
Expand Down