From e46694a33ffa7a5d2c88a45c050d36e9dcca8afa Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Fri, 15 Apr 2022 20:29:23 +0300 Subject: [PATCH] Ignore newlines in HTML completely again --- ui/messages/html/parser.go | 1 + 1 file changed, 1 insertion(+) 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 {