Revert "Fix EOL handling in web editor" (#28101)

Reverts go-gitea/gitea#27141
close #28097
This commit is contained in:
Nanguan Lin 2023-11-22 17:14:16 +08:00 committed by GitHub
parent 4d0eba8e0a
commit 37ed92d6fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 22 deletions

View file

@ -287,7 +287,7 @@ func editFilePost(ctx *context.Context, form forms.EditRepoFileForm, isNewFile b
Operation: operation,
FromTreePath: ctx.Repo.TreePath,
TreePath: form.TreePath,
ContentReader: strings.NewReader(form.Content),
ContentReader: strings.NewReader(strings.ReplaceAll(form.Content, "\r", "")),
},
},
Signoff: form.Signoff,