From be3b1d9e248958374fe7a8ae63ee9a7fa5991b8a Mon Sep 17 00:00:00 2001 From: ialokim <ialokim@mailbox.org> Date: Thu, 31 Aug 2023 13:54:47 +0200 Subject: [PATCH] remove redundant regex call since Jsoup already combines whitespaces for us --- .../main/kotlin/org/briarproject/briar/desktop/blog/HtmlText.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/HtmlText.kt b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/HtmlText.kt index 148dc82511..88a5739b7f 100644 --- a/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/HtmlText.kt +++ b/briar-desktop/src/main/kotlin/org/briarproject/briar/desktop/blog/HtmlText.kt @@ -318,8 +318,6 @@ fun HtmlText( val text = if (withinPre) node.wholeText else node.text() - // replace multiple newlines/whitespaces to single whitespace - .replace("\\s+".toRegex(), " ") // remove whitespace if first character in new line .let { if (lastCharWasNewline) it.trimStart() else it } if (text.isNotBlank()) { -- GitLab