Update HtmlFormatter.kt

优化
pull/1123/head
bushixuanqi 3 years ago committed by GitHub
parent 7f7e472bf8
commit c74832fb71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      app/src/main/java/io/legado/app/utils/HtmlFormatter.kt

@ -59,16 +59,16 @@ object HtmlFormatter {
do{
val url = matcher.group(1)!!
val urlBefore = url.substringBefore(',')
val pos = url.indexOf(',')
sb.append(keepImgHtml.substring(appendPos, matcher.start()).replace("\n","\n  ")) //非图片部分换行缩减
sb.append(
"<img src=\"${
NetworkUtils.getAbsoluteURL(
redirectUrl,
urlBefore
url.substring( 0, pos)
)
}${
url.substring(urlBefore.length)
},${
url.substring( pos + 1 ).trim{ it <'!' }
}\">"
)
appendPos = matcher.end()

Loading…
Cancel
Save