Skip to content

Added deletion of an empty line at the end of the file (#4050) #4054

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

Merged
merged 3 commits into from
May 29, 2018

Conversation

axifive
Copy link
Member

@axifive axifive commented May 27, 2018

fix #4050
Now the same viewing behavior as the GitHub.

While viewing:
2018-05-27 3 08 22

While editing:
2018-05-27 3 08 36

Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
@codecov-io
Copy link

codecov-io commented May 27, 2018

Codecov Report

Merging #4054 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4054      +/-   ##
==========================================
- Coverage   19.96%   19.96%   -0.01%     
==========================================
  Files         153      153              
  Lines       30478    30482       +4     
==========================================
  Hits         6086     6086              
- Misses      23479    23483       +4     
  Partials      913      913
Impacted Files Coverage Δ
routers/repo/view.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9aa8fdc...4091be3. Read the comment docs.

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 27, 2018
@lunny lunny added topic/ui Change the appearance of the Gitea UI type/bug labels May 27, 2018
@lunny lunny added this to the 1.5.0 milestone May 27, 2018
@lunny
Copy link
Member

lunny commented May 27, 2018

LGTM

@bkcsoft bkcsoft added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 27, 2018
@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 27, 2018
@jonasfranz
Copy link
Member

@lunny I think this issue is more an enhancement then a bug.

@lunny
Copy link
Member

lunny commented May 28, 2018

@JonasFranzDEV I don't think so. see

lines := strings.Split(fileContent, "\n")

And assume we have a file

a = b\n
c = d\n

This will always output 3 lines, because we used strings.Split but in fact there are only 2 lines. see https://play.golang.org/p/AnU7W3inKz4

@lunny lunny merged commit f86f56e into go-gitea:master May 29, 2018
@lunny
Copy link
Member

lunny commented May 29, 2018

@axifive please send a backport PR to relase/v1.4

axifive added a commit to axifive/gitea that referenced this pull request May 29, 2018
Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
@lunny lunny added the backport/done All backports for this PR have been created label May 29, 2018
@axifive axifive deleted the remove-last-blank-line branch May 29, 2018 09:07
lunny pushed a commit that referenced this pull request May 29, 2018
Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/ui Change the appearance of the Gitea UI type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gitea shows an extra non-existing blank line at the end of every file
5 participants