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