去正文最后的换行

pull/179/head
Celeter 5 years ago
parent 2d7dd7127a
commit ea98cca8e8
  1. 1
      app/src/main/java/io/legado/app/help/BookHelp.kt
  2. 1
      app/src/main/java/io/legado/app/model/webBook/BookContent.kt

@ -237,6 +237,5 @@ object BookHelp {
} }
return c return c
.replace("\\s*\\n+\\s*".toRegex(), "\n${ReadBookConfig.bodyIndent}") .replace("\\s*\\n+\\s*".toRegex(), "\n${ReadBookConfig.bodyIndent}")
.replace("[\\n\\s]+$".toRegex(), "") //移除尾部空行
} }
} }

@ -101,6 +101,7 @@ object BookContent {
} }
} }
content.deleteCharAt(content.length - 1)
Debug.log(bookSource.bookSourceUrl, "┌获取章节名称") Debug.log(bookSource.bookSourceUrl, "┌获取章节名称")
Debug.log(bookSource.bookSourceUrl, "${bookChapter.title}") Debug.log(bookSource.bookSourceUrl, "${bookChapter.title}")
Debug.log(bookSource.bookSourceUrl, "┌获取正文内容") Debug.log(bookSource.bookSourceUrl, "┌获取正文内容")

Loading…
Cancel
Save