telegramfmt: merge duplicate cases

This commit is contained in:
Tulir Asokan
2025-12-16 17:11:59 +02:00
parent e9d95a6e9a
commit 85e1a6dc05
+1 -3
View File
@@ -56,9 +56,7 @@ func (s Style) Format(message string) string {
return fmt.Sprintf("<pre><code>%s</code></pre>", message)
case StyleEmail:
return fmt.Sprintf(`<a href="mailto:%s">%s</a>`, message, message)
case StyleTextURL:
return fmt.Sprintf(`<a href="%s">%s</a>`, s.URL, message)
case StyleURL:
case StyleTextURL, StyleURL:
return fmt.Sprintf(`<a href="%s">%s</a>`, s.URL, message)
case StyleCustomEmoji:
if s.EmojiInfo.Emoji != "" {