From 7f7e472bf8a971932d707e0860b5466d8268b58c Mon Sep 17 00:00:00 2001 From: bushixuanqi <57338301+bushixuanqi@users.noreply.github.com> Date: Sat, 17 Jul 2021 03:34:54 +0800 Subject: [PATCH] Update HtmlFormatter.kt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 优化 --- app/src/main/java/io/legado/app/utils/HtmlFormatter.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 3bdd322ea..f7deb29a5 100644 --- a/app/src/main/java/io/legado/app/utils/HtmlFormatter.kt +++ b/app/src/main/java/io/legado/app/utils/HtmlFormatter.kt @@ -59,16 +59,16 @@ object HtmlFormatter { do{ val url = matcher.group(1)!! - val pos = url.indexOf(',') + val urlBefore = url.substringBefore(',') sb.append(keepImgHtml.substring(appendPos, matcher.start()).replace("\n","\n  ")) //非图片部分换行缩减 sb.append( "" ) appendPos = matcher.end()