(new): rich messages, tgfmt DSL, Bot API 10.1
Golang lint / lint (push) Successful in 29s
Golang lint / lint (pull_request) Successful in 1m47s

(fix): editMessageText rich_message type
(tests): rich and API 10.1 coverage
(doc): rich godoc, CHANGELOG v1.1.0

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-08 12:45:47 +03:00
co-authored by Claude Fable 5
parent b563e695df
commit 48ddf66540
22 changed files with 2232 additions and 1027 deletions
+9
View File
@@ -2,6 +2,15 @@ package tgfmt
import "strings"
func escapeHTML(s string) string {
s = strings.ReplaceAll(s, "&", "&amp;")
s = strings.ReplaceAll(s, "<", "&lt;")
s = strings.ReplaceAll(s, ">", "&gt;")
s = strings.ReplaceAll(s, `"`, "&quot;")
return s
}
func escapeRich(s string) Rich { return Rich(escapeHTML(s)) }
// EscapePunctuation escapes '.', '!' and '-' for MarkdownV2 fragments.
func EscapePunctuation(s string) string {
symbols := []string{".", "!", "-"}