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 990422fa8..65ed42b80 100644 --- a/app/src/main/java/io/legado/app/utils/HtmlFormatter.kt +++ b/app/src/main/java/io/legado/app/utils/HtmlFormatter.kt @@ -24,6 +24,7 @@ object HtmlFormatter { html ?: return "" val keepImgHtml = html.replace(wrapHtmlRegex, "\n") .replace(notImgHtmlRegex, "") + .replace("\\n\\s*$|^\\s*\\n".toRegex(), "") .replace("\\n\\s*\\n|\\n\\s*$|^\\s*\\n".toRegex(), "\n") var str = StringBuffer()