From 7da9ff6912bd11e65cd46506da0e332421ffdd23 Mon Sep 17 00:00:00 2001 From: gedoor Date: Tue, 15 Jun 2021 16:06:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DhtmlFormatter=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/constant/AppPattern.kt | 2 +- .../io/legado/app/ui/book/read/page/provider/ChapterProvider.kt | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/constant/AppPattern.kt b/app/src/main/java/io/legado/app/constant/AppPattern.kt index 6f5113100..cea60d9c5 100644 --- a/app/src/main/java/io/legado/app/constant/AppPattern.kt +++ b/app/src/main/java/io/legado/app/constant/AppPattern.kt @@ -9,7 +9,7 @@ object AppPattern { val EXP_PATTERN: Pattern = Pattern.compile("\\{\\{([\\w\\W]*?)\\}\\}") //图片有data-开头的数据属性时优先用数据属性作为src,没有数据属性时才匹配src val imgPattern: Pattern = - Pattern.compile("]*data-)src|(?=[^>]*data-)[^>]*data-[^= ]+) *= *\"([^\"{]+(?:\\{(?:[^{}]|\\{[^{}]*\\})*\\})?)\"[^>]*>", Pattern.CASE_INSENSITIVE) + Pattern.compile("", Pattern.CASE_INSENSITIVE) val nameRegex = Regex("\\s+作\\s*者.*|\\s+\\S+\\s+著") val authorRegex = Regex("^.*?作\\s*者[::\\s]*|\\s+著") diff --git a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt index 4f0596f42..fad8cc606 100644 --- a/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt +++ b/app/src/main/java/io/legado/app/ui/book/read/page/provider/ChapterProvider.kt @@ -118,12 +118,10 @@ object ChapterProvider { val matcher = AppPattern.imgPattern.matcher(text) if (matcher.find()) { matcher.group(1)?.let { src -> - //if (!book.isEpub()) { durY = setTypeImage( book, bookChapter, src, durY, textPages, book.getImageStyle() ) - //} } } else { val isTitle = index == 0