mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
Factor out into NormalizeLinefeeds; add tests
This commit is contained in:
@ -63,3 +63,9 @@ func TrimTrailingNewline(str string) string {
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
func NormalizeLinefeeds(str string) string {
|
||||
str = strings.Replace(str, "\r\n", "\n", -1)
|
||||
str = strings.Replace(str, "\r", "\n", -1)
|
||||
return str
|
||||
}
|
||||
|
Reference in New Issue
Block a user