HtmlFormatter.kt

pull/1132/head
gedoor 3 years ago
parent a200106117
commit b1d73f9bc2
  1. 5
      app/src/main/java/io/legado/app/utils/HtmlFormatter.kt

@ -22,10 +22,7 @@ object HtmlFormatter {
fun formatKeepImg(html: String?, redirectUrl: URL?): String {
html ?: return ""
val keepImgHtml = html.replace(wrapHtmlRegex, "\n")
.replace(notImgHtmlRegex, "")
.replace("[\\n\\s]+\$|^[\\n\\s]+".toRegex(), "")
.replace("\\s*\\n+\\s*".toRegex(), "\n")
val keepImgHtml = format(html, notImgHtmlRegex)
var str = StringBuffer()
var endPos = 0

Loading…
Cancel
Save