From 735c75c69de90dd331666e6158921acd1dabe8aa Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 21 Apr 2020 21:15:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=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/help/BookHelp.kt | 7 ++++++- 1 file changed, 6 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 95a612610..dafaaec8c 100644 --- a/app/src/main/java/io/legado/app/help/BookHelp.kt +++ b/app/src/main/java/io/legado/app/help/BookHelp.kt @@ -241,7 +241,12 @@ object BookHelp { val contents = arrayListOf() c.split("\n").forEach { val str = it.replace("^\\s+".toRegex(), "") - if (str.isNotEmpty()) { + if (contents.isEmpty()) { + contents.add(title) + if (it != title && it.isNotEmpty()) { + contents.add("${ReadBookConfig.bodyIndent}$str") + } + } else if (str.isNotEmpty()) { contents.add("${ReadBookConfig.bodyIndent}$str") } }