mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
fix: fail to remove duplicate title when content only has title
This commit is contained in:
@@ -85,7 +85,7 @@ class ContentProcessor private constructor(
|
||||
try {
|
||||
val name = Pattern.quote(book.name)
|
||||
val title = Pattern.quote(chapter.title)
|
||||
val titleRegex = "^(\\s|\\p{P}|${name})*${title}(\\s)+".toRegex()
|
||||
val titleRegex = "^(\\s|\\p{P}|${name})*${title}(\\s)*".toRegex()
|
||||
mContent = mContent.replace(titleRegex, "")
|
||||
} catch (e: Exception) {
|
||||
AppLog.put("去除重复标题出错\n${e.localizedMessage}", e)
|
||||
|
||||
Reference in New Issue
Block a user