From 2c4d6c736763d54b0e2f7162303713509eb87ebd Mon Sep 17 00:00:00 2001 From: bushixuanqi <57338301+bushixuanqi@users.noreply.github.com> Date: Sat, 17 Jul 2021 04:55:48 +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 | 6 ++---- 1 file changed, 2 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 5f69f5b9f..8f9fffe02 100644 --- a/app/src/main/java/io/legado/app/utils/HtmlFormatter.kt +++ b/app/src/main/java/io/legado/app/utils/HtmlFormatter.kt @@ -60,8 +60,7 @@ object HtmlFormatter { do{ val url = matcher.group(1)!! val urlBefore = url.substringBefore(',') - val beforeStr = keepImgHtml.substring(appendPos, matcher.start()) - sb.append( if(beforeStr == "\n") '\n' else beforeStr.replace("\n","\n  ") ) //缩进换行下个非图片段落 + sb.append( keepImgHtml.substring(appendPos, matcher.start()).replace("\n","\n  ") ) //缩进换行下个非图片段落 sb.append( "