From acb44a1a55f33fccf08c9d8ab23f53359a634dd1 Mon Sep 17 00:00:00 2001 From: gedoor Date: Sun, 12 Jul 2020 11:21:16 +0800 Subject: [PATCH] =?UTF-8?q?html=E8=A7=84=E5=88=99=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/utils/StringExtensions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/utils/StringExtensions.kt b/app/src/main/java/io/legado/app/utils/StringExtensions.kt index ae881eb64..b3d599860 100644 --- a/app/src/main/java/io/legado/app/utils/StringExtensions.kt +++ b/app/src/main/java/io/legado/app/utils/StringExtensions.kt @@ -33,7 +33,7 @@ fun String?.isJsonArray(): Boolean = } ?: false fun String?.htmlFormat(): String = - this?.replace("(?i)<(br[\\s/]*|/*p\\b.*?|/*div\\b.*?)>".toRegex(), "\n") + this?.replace("]*>".toRegex(), "\n") ?.replace("<[script>]*.*?>| ".toRegex(), "") ?.replace("\\s*\\n+\\s*".toRegex(), "\n  ") ?.replace("^[\\n\\s]+".toRegex(), "  ")