From 2b0ae047c70fd0530d69d27fd93a2570b3e3600d Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 15 Sep 2021 17:10:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/help/ContentProcessor.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/io/legado/app/help/ContentProcessor.kt b/app/src/main/java/io/legado/app/help/ContentProcessor.kt index 96bdb340d..a441fb8f5 100644 --- a/app/src/main/java/io/legado/app/help/ContentProcessor.kt +++ b/app/src/main/java/io/legado/app/help/ContentProcessor.kt @@ -66,8 +66,7 @@ class ContentProcessor private constructor( it.code <= 0x20 || it == ' ' || it == ',' || it == ',' } //去除重复标题 - val titleRegex = - "^(\\s|\\pP)*(${book.name})*(\\s|\\pP)*${chapter.title}(\\s|\\pP)+".toRegex() + val titleRegex = "^(\\s|\\pP|${book.name})*${chapter.title}(\\s|\\pP)+".toRegex() mContent = mContent.replace(titleRegex, "") if (includeTitle) { //重新添加标题