feat: 优化

pull/201/head
kunfei 5 years ago
parent b4bbbba28f
commit 735c75c69d
  1. 7
      app/src/main/java/io/legado/app/help/BookHelp.kt

@ -241,7 +241,12 @@ object BookHelp {
val contents = arrayListOf<String>()
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")
}
}

Loading…
Cancel
Save