mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
fix #2943
This commit is contained in:
parent
100589d215
commit
1bfe9a0e5d
@ -223,12 +223,13 @@ class EpubFile(var book: Book) {
|
||||
*/
|
||||
if (!startFragmentId.isNullOrBlank()) {
|
||||
bodyElement.getElementById(startFragmentId)?.outerHtml()?.let {
|
||||
bodyString = bodyString.substringAfter(it)
|
||||
/* 章节内容在fragmentI对应的div下时 会截取空白 */
|
||||
bodyString = bodyString.substringAfter(it).ifBlank { bodyString }
|
||||
}
|
||||
}
|
||||
if (!endFragmentId.isNullOrBlank() && endFragmentId != startFragmentId) {
|
||||
bodyElement.getElementById(endFragmentId)?.outerHtml()?.let {
|
||||
bodyString = bodyString.substringBefore(it)
|
||||
bodyString = bodyString.substringBefore(it).ifBlank { bodyString }
|
||||
}
|
||||
}
|
||||
//截取过再重新解析
|
||||
|
Loading…
Reference in New Issue
Block a user