forgejo/routers/web/repo
Gusted 5cf976739c
[UI] Do not include trailing EOL character when counting lines
- Adjust the counting of the number of lines of a file to match the
amount of rendered lines. This simply means that a file with the content
of `a\n` will be shown as having `1 line` rather than `2 lines`. This
matches with the amount of lines that are being rendered (the last empty
line is never rendered) and matches more with the expecation of the
user (a trailing EOL is a technical detail).
- In the case there's no EOL, the reason why it was counting
'incorrectly' was to show if there was a trailing EOL or not, but now
text is shown to tell the user this.
- Integration test added.
- Resolves Codeberg/Community#1612
2024-08-06 04:36:57 +02:00
..
actions fix artifact range requests (#4218) 2024-07-10 05:28:01 +00:00
badges
flags
setting feat(quota): Quota enforcement 2024-08-02 11:10:34 +02:00
activity.go
attachment.go Implement external assets 2024-07-29 20:35:55 +02:00
blame.go
branch.go
cherry_pick.go
code_frequency.go
commit.go [BUG] Fix panic on too high page number 2024-07-21 02:01:54 +02:00
compare.go
contributors.go
download.go
editor.go
editor_test.go
find.go
githttp.go
githttp_test.go
helper.go
helper_test.go
issue.go [UI] Convert milestone to HTMX 2024-07-17 14:52:00 +02:00
issue_content_history.go
issue_dependency.go
issue_label.go
issue_label_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
issue_lock.go
issue_pin.go
issue_stopwatch.go
issue_test.go
issue_timetrack.go
issue_watch.go
main_test.go
middlewares.go
migrate.go feat(quota): Quota enforcement 2024-08-02 11:10:34 +02:00
milestone.go
packages.go
patch.go
projects.go
projects_test.go
pull.go feat(quota): Quota enforcement 2024-08-02 11:10:34 +02:00
pull_review.go
pull_review_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
recent_commits.go
release.go Implement external assets 2024-07-29 20:35:55 +02:00
release_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
render.go
repo.go feat(quota): Quota enforcement 2024-08-02 11:10:34 +02:00
search.go
topic.go
treelist.go
view.go [UI] Do not include trailing EOL character when counting lines 2024-08-06 04:36:57 +02:00
view_test.go
wiki.go
wiki_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00