1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Convert \r\n to \n; don't depend on unix2dos

This commit is contained in:
Tommy Nguyen
2018-08-20 09:16:35 -04:00
parent 5dd049eb82
commit 45fea83771
3 changed files with 9 additions and 6 deletions

View File

@ -66,7 +66,7 @@ func TrimTrailingNewline(str string) string {
// NormalizeLinefeeds - Removes all Windows and Mac style line feeds
func NormalizeLinefeeds(str string) string {
str = strings.Replace(str, "\r\n", "", -1)
str = strings.Replace(str, "\r\n", "\n", -1)
str = strings.Replace(str, "\r", "", -1)
return str
}