mirror of
https://github.com/mautrix/telegram.git
synced 2026-05-17 07:25:46 +03:00
matrixfmt: fix bridging code blocks
This commit is contained in:
@@ -452,7 +452,9 @@ func (parser *HTMLParser) tagToString(node *html.Node, ctx Context) *EntityStrin
|
||||
} else {
|
||||
preStr = parser.nodeToString(node.FirstChild, ctx.WithWhitespace())
|
||||
}
|
||||
return preStr.Format(telegramfmt.Style{Type: telegramfmt.StylePre, Language: language})
|
||||
|
||||
preStr.Entities = nil
|
||||
return preStr.TrimSpace().Format(telegramfmt.Style{Type: telegramfmt.StylePre, Language: language})
|
||||
default:
|
||||
return parser.nodeToTagAwareString(node.FirstChild, ctx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user