Web UI displays files with an extra blank line at the end #1378

Closed
opened 2025-11-02 03:58:39 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @smkent on GitHub (Dec 17, 2017).

Description

Files are displayed with an extra blank line at the end. For example, a text file such as this:

$ cat test.txt
This is a test text file with a blank second line,

and some text on the third line. There is no fourth line.
$

renders in the UI with an extra fourth blank line:

extra-newlines

Screenshots

See above.

Originally created by @smkent on GitHub (Dec 17, 2017). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.3.0 - Git version: 2.13.6 - Operating system: Gentoo Linux - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes (provide example URL): https://try.gitea.io/testrepo1/newlines-test/src/branch/master/test.txt - [ ] No - [ ] Not relevant - Log gist: ## Description Files are displayed with an extra blank line at the end. For example, a text file such as this: ``` $ cat test.txt This is a test text file with a blank second line, and some text on the third line. There is no fourth line. $ ``` renders in the UI with an extra fourth blank line: ![extra-newlines](https://user-images.githubusercontent.com/2831985/34083925-1023b5b8-e32d-11e7-9acc-67b5dceede99.png) ## Screenshots See above.
GiteaMirror added the topic/uiissue/staletype/bug labels 2025-11-02 03:58:39 -06:00
Author
Owner

@stale[bot] commented on GitHub (Feb 9, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Feb 9, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Feb 23, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Feb 23, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1378