去除段尾空格,避免分行后出现空白行

pull/889/head
hoodie13 4 years ago
parent 897955e4c0
commit 6ba115ebd6
  1. 2
      app/src/main/java/io/legado/app/help/ContentProcessor.kt

@ -65,7 +65,7 @@ class ContentProcessor(private val bookName: String, private val bookOrigin: Str
}
val contents = arrayListOf<String>()
content1.split("\n").forEach {
val str = it.replace("^[\\n\\s\\r]+".toRegex(), "")
val str = it.replace("^[\\n\\r]+".toRegex(), "").trim()
if (contents.isEmpty()) {
contents.add(title)
if (str != title && str.isNotEmpty()) {

Loading…
Cancel
Save