Update HtmlFormatter.kt

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

@ -60,7 +60,8 @@ object HtmlFormatter {
do{
val url = matcher.group(1)!!
val pos = url.indexOf(',')
sb.append(keepImgHtml.substring(appendPos, matcher.start()).replace("\n","\n  ")) //非图片部分换行缩减
val beforeStr = keepImgHtml.substring(appendPos, matcher.start())
sb.append( if(beforeStr == "\n") '\n' else beforeStr.replace("\n","\n  ") ) //缩进换行下个非图片段落
sb.append(
"<img src=\"${
NetworkUtils.getAbsoluteURL(

Loading…
Cancel
Save