From d2dab7f43bc8856ecdd3137ac67c0f8644b09de5 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 9 Mar 2020 14:46:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/BookHelp.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/help/BookHelp.kt b/app/src/main/java/io/legado/app/help/BookHelp.kt index 304df9997..b7b45baea 100644 --- a/app/src/main/java/io/legado/app/help/BookHelp.kt +++ b/app/src/main/java/io/legado/app/help/BookHelp.kt @@ -300,6 +300,8 @@ object BookHelp { 1 -> c = ZhConvertBootstrap.newInstance().toSimple(c) 2 -> c = ZhConvertBootstrap.newInstance().toTraditional(c) } - return c.replace("\\s*\\n+\\s*".toRegex(), "\n${ReadBookConfig.bodyIndent}") + return c + .replace("\\s*\\n+\\s*".toRegex(), "\n${ReadBookConfig.bodyIndent}") + .replace("[\\n\\s]+$".toRegex(), "") //移除尾部空行 } } \ No newline at end of file