X-Git-Url: http://git.giacomolli.uk/onechat/blobdiff_plain/790279faf0fda789d93a75f6f5996e65d5de4a18..HEAD:/telegram.go?ds=inline diff --git a/telegram.go b/telegram.go index 4e2bf7c..f2c687a 100644 --- a/telegram.go +++ b/telegram.go @@ -721,10 +721,10 @@ func telegramRichCut(markdown string, limit int) (int, string, string) { end += start + 1 text := strings.TrimRight(markdown[start:end], "\r\n") - _, opens := telegramCodeFence(text) + _, opens := markdownCodeFence(text) switch { case fence != "": - if telegramClosesFence(text, fence) { + if markdownClosesFence(text, fence) { fence = "" } else if end > len(opening)+1 && end+len(fence)+1 <= limit { code, inFence, inOpening = end, fence, opening