Extra blank line shown at end of files #9614

Closed
opened 2025-11-02 08:44:33 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @ghost on GitHub (Sep 24, 2022).

Description

Any file that ends in a single \n (so no visible trailing newline in text editors) seems to have an extra blank numbered line shown when viewing it from Gitea on web. I'm posting this as a new issue as #4050 is closed and locked but it appears to have regressed.

I can't seem to reproduce this on try.gitea.io so perhaps it's been fixed in dev already, but on a quick search I haven't found any recent commits or issues relating to this.

Gitea Version

1.17.2

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No EOL:
Screenshot of No EOL

Single EOL\n:
Screenshot of Single EOL

Double EOL\n\n:
Screenshot of Double EOL

Git Version

2.31.0

Operating System

Debian 11

How are you running Gitea?

Precompiled build, systemd service

Database

MySQL

Originally created by @ghost on GitHub (Sep 24, 2022). ### Description Any file that ends in a single `\n` (so no visible trailing newline in text editors) seems to have an extra blank numbered line shown when viewing it from Gitea on web. I'm posting this as a new issue as #4050 is closed and locked but it appears to have regressed. I can't seem to reproduce this on try.gitea.io so perhaps it's been fixed in dev already, but on a quick search I haven't found any recent commits or issues relating to this. ### Gitea Version 1.17.2 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots `No EOL`: ![Screenshot of No EOL](https://user-images.githubusercontent.com/482367/192094854-ac50d1ce-8ee6-4ff1-b21e-b1e959062724.png) `Single EOL\n`: ![Screenshot of Single EOL](https://user-images.githubusercontent.com/482367/192094878-400d993d-8f1f-4bf5-963e-70152d0f2fee.png) `Double EOL\n\n`: ![Screenshot of Double EOL](https://user-images.githubusercontent.com/482367/192094890-ce86150c-cdb0-47f7-9676-0d94fd684c96.png) ### Git Version 2.31.0 ### Operating System Debian 11 ### How are you running Gitea? Precompiled build, systemd service ### Database MySQL
GiteaMirror added the issue/needs-feedback label 2025-11-02 08:44:33 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Sep 24, 2022):

Can you try it with 1.18 (https://try.gitea.io)?

I think the problem has a clear solution now (but not in 1.17, due to some long argument before 1.17's freezing)

@wxiaoguang commented on GitHub (Sep 24, 2022): Can you try it with 1.18 (https://try.gitea.io)? I think the problem has a clear solution now (but not in 1.17, due to some long argument before 1.17's freezing) * https://github.com/go-gitea/gitea/pull/19967 * https://github.com/go-gitea/gitea/pull/18076#issuecomment-1240149559
Author
Owner

@ghost commented on GitHub (Sep 24, 2022):

Yeah seems fine there, didn't spot that this was explicitly addressed recently.

@ghost commented on GitHub (Sep 24, 2022): Yeah seems fine there, didn't spot that this was explicitly addressed recently.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9614