From 125974bfac0de39f6d298945f0b78030b3b090e8 Mon Sep 17 00:00:00 2001 From: Marcel Schramm Date: Sat, 12 Oct 2019 11:17:53 +0200 Subject: [PATCH] Remove escape cahracter from quoted backticks --- ui/chatview.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/chatview.go b/ui/chatview.go index ce9217de..59828f41 100644 --- a/ui/chatview.go +++ b/ui/chatview.go @@ -589,7 +589,9 @@ func (chatView *ChatView) formatDefaultMessageText(message *discordgo.Message) s messageText = strings.Replace(messageText, values[2], formattedCode, 1) } - messageText = strings.Replace(strings.Replace(parseBoldAndUnderline(messageText), "\\*", "*", -1), "\\_", "_", -1) + messageText = strings. + NewReplacer("\\*", "*", "\\_", "_", "\\`", "`"). + Replace(parseBoldAndUnderline(messageText)) shouldShow, contains := chatView.showSpoilerContent[message.ID] if !contains || !shouldShow {