From fa12c23d7936ceb372b94097094eb19af385be0e Mon Sep 17 00:00:00 2001 From: jvoisin Date: Thu, 29 Feb 2024 00:29:35 +0100 Subject: [PATCH] =?UTF-8?q?Use=20strings.ReplaceAll=20instead=20of=20strin?= =?UTF-8?q?gs.Replace(=E2=80=A6,=20-1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/reader/media/media.go | 2 +- internal/reader/rewrite/rewrite_functions.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/reader/media/media.go b/internal/reader/media/media.go index bd846100..4d9c3661 100644 --- a/internal/reader/media/media.go +++ b/internal/reader/media/media.go @@ -156,7 +156,7 @@ func (d *Description) HTML() string { return d.Description } - content := strings.Replace(d.Description, "\n", "
", -1) + content := strings.ReplaceAll(d.Description, "\n", "
") return textLinkRegex.ReplaceAllString(content, `${1}`) } diff --git a/internal/reader/rewrite/rewrite_functions.go b/internal/reader/rewrite/rewrite_functions.go index 122b2327..8b735661 100644 --- a/internal/reader/rewrite/rewrite_functions.go +++ b/internal/reader/rewrite/rewrite_functions.go @@ -302,7 +302,7 @@ func replaceTextLinks(input string) string { } func replaceLineFeeds(input string) string { - return strings.Replace(input, "\n", "
", -1) + return strings.ReplaceAll(input, "\n", "
") } func replaceCustom(entryContent string, searchTerm string, replaceTerm string) string {