support multi-line code blocks.
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/42wim/matterbridge/bridge/config"
|
||||
"github.com/42wim/matterbridge/bridge/helper"
|
||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
func (b *Btelegram) handleUpdate(rmsg *config.Message, message, posted, edited *tgbotapi.Message) *tgbotapi.Message {
|
||||
@@ -455,5 +456,9 @@ func (b *Btelegram) handleEntities(rmsg *config.Message, message *tgbotapi.Messa
|
||||
if e.Type == "code" {
|
||||
rmsg.Text = "`" + rmsg.Text + "`"
|
||||
}
|
||||
|
||||
if e.Type == "pre" {
|
||||
rmsg.Text = "```\n" + rmsg.Text + "\n```"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user