diff --git a/ui/messages/html/parser.go b/ui/messages/html/parser.go index 57474db..b0f39de 100644 --- a/ui/messages/html/parser.go +++ b/ui/messages/html/parser.go @@ -382,6 +382,7 @@ func (parser *htmlParser) singleNodeToEntity(node *html.Node) Entity { switch node.Type { case html.TextNode: if !parser.preserveWhitespace { + node.Data = strings.ReplaceAll(node.Data, "\n", "") node.Data = spaces.ReplaceAllLiteralString(node.Data, " ") } if len(node.Data) == 0 {