mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-17 00:18:05 +02:00
NormalizeLinefeeds removes rather than converts Window/Mac style lf's
This commit is contained in:
@ -64,9 +64,10 @@ func TrimTrailingNewline(str string) string {
|
||||
return str
|
||||
}
|
||||
|
||||
// NormalizeLinefeeds - Removes all Windows and Mac style line feeds
|
||||
func NormalizeLinefeeds(str string) string {
|
||||
str = strings.Replace(str, "\r\n", "\n", -1)
|
||||
str = strings.Replace(str, "\r", "\n", -1)
|
||||
str = strings.Replace(str, "\r\n", "", -1)
|
||||
str = strings.Replace(str, "\r", "", -1)
|
||||
return str
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user