diff --git a/app/src/main/java/io/legado/app/utils/HtmlFormatter.kt b/app/src/main/java/io/legado/app/utils/HtmlFormatter.kt index 46789b13b..325eefdf0 100644 --- a/app/src/main/java/io/legado/app/utils/HtmlFormatter.kt +++ b/app/src/main/java/io/legado/app/utils/HtmlFormatter.kt @@ -24,7 +24,7 @@ object HtmlFormatter { html ?: return "" val keepImgHtml = html.replace(wrapHtmlRegex, "\n") .replace(notImgHtmlRegex, "") - .replace("\\n\\s*\\n".toRegex(), "\n") + .replace("\\n\\s*\\n|\\n$|^\\n".toRegex(), "\n") var str = StringBuffer() var endPos = 0