-// telegramUnescapeTags gives back the Markdown that telegramEscapeTags escaped.
-// It is exact, because after the escape each & outside code starts & or
-// <. It also works on a part of telegramSplitRich, because a part has the
-// same code as the text that it comes from.
-func telegramUnescapeTags(markdown string) string {
- return telegramRewriteProse(markdown, telegramTagUnescaper.Replace)
-}
-
-// telegramUTF16Units returns the number of UTF-16 code units of text.
-func telegramUTF16Units(text string) int {
- units := 0
- for _, char := range text {
- units++
- if char > 0xFFFF {
- units++
- }
- }
-
- return units
-}
-