mirror of
https://github.com/gedoor/legado.git
synced 2024-07-19 01:17:25 +08:00
优化
This commit is contained in:
parent
1da18a994f
commit
802515715c
@ -86,8 +86,11 @@ class ContentProcessor private constructor(
|
||||
//去除重复标题
|
||||
if (BookHelp.removeSameTitle(book, chapter)) try {
|
||||
val name = Pattern.quote(book.name)
|
||||
val title = Pattern.quote(chapter.title)
|
||||
val titleRegex = "^(\\s|\\p{P}|${name})*${title}(\\s)*"
|
||||
val title0 = Pattern.quote(chapter.title)
|
||||
val title1 = Pattern.quote(
|
||||
chapter.getDisplayTitle(contentReplaceRules, chineseConvert = false)
|
||||
)
|
||||
val titleRegex = "^(\\s|\\p{P}|${name})*(${title0}|${title1})(\\s)*"
|
||||
val matcher = Pattern.compile(titleRegex)
|
||||
.matcher(mContent)
|
||||
if (matcher.find()) {
|
||||
|
Loading…
Reference in New Issue
Block a user