Skip to content

Extra blank line shown at end of files #21255

Closed
@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/needs-feedbackFor bugs, we need more details. For features, the feature must be described in more detail

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions