From 22fbdb07f0280d892c37bb65296a3aca4e772e75 Mon Sep 17 00:00:00 2001 From: Ismael Padilla Date: Thu, 14 Jul 2022 17:17:36 -0300 Subject: [PATCH] Use ReplaceAll instead of Replace with n=-1 --- style.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/style.go b/style.go index edf3126f..576ace4a 100644 --- a/style.go +++ b/style.go @@ -262,7 +262,7 @@ func (s Style) Render(str string) string { // Strip newlines in single line mode if inline { - str = strings.Replace(str, "\n", "", -1) + str = strings.ReplaceAll(str, "\n", "") } // Word wrap