diff --git a/ruler.go b/ruler.go index 21141676..246772b5 100644 --- a/ruler.go +++ b/ruler.go @@ -78,7 +78,7 @@ func renderRuler(ruler *template.Template, data rulerData, width int) (string, s return "", "", err } - s := strings.ReplaceAll(b.String(), "\n", "") + s := strings.NewReplacer("\r", "", "\n", "").Replace(b.String()) sections := strings.Split(s, "\x1f") if len(sections) == 1 {