|
|
@ -97,11 +97,9 @@ object BookContent { |
|
|
|
} |
|
|
|
} |
|
|
|
content.deleteCharAt(content.length - 1) |
|
|
|
content.deleteCharAt(content.length - 1) |
|
|
|
var contentStr = content.toString().htmlFormat() |
|
|
|
var contentStr = content.toString().htmlFormat() |
|
|
|
val replaceRegex = bookSource.ruleContent?.replaceRegex |
|
|
|
val replaceRegex = bookSource.ruleContent?.replaceRegex?.trim() |
|
|
|
replaceRegex?.trim { it <= ' ' }?.split("##")?.let { |
|
|
|
if (!replaceRegex.isNullOrEmpty()) { |
|
|
|
if (it.size > 1) { |
|
|
|
contentStr = AnalyzeRule(book).setContent(contentStr).getString(replaceRegex) |
|
|
|
contentStr = contentStr.replace(it[1].toRegex(), it.getOrNull(2) ?: "") |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
Debug.log(bookSource.bookSourceUrl, "┌获取章节名称") |
|
|
|
Debug.log(bookSource.bookSourceUrl, "┌获取章节名称") |
|
|
|
Debug.log(bookSource.bookSourceUrl, "└${bookChapter.title}") |
|
|
|
Debug.log(bookSource.bookSourceUrl, "└${bookChapter.title}") |
|
|
|