优化正文

pull/1319/head
gedoor 3 years ago
parent 0f6056e389
commit 37a441ff64
  1. 6
      app/src/main/java/io/legado/app/help/ContentProcessor.kt

@ -63,7 +63,7 @@ class ContentProcessor private constructor(
): List<String> { ): List<String> {
//去除无效内容 //去除无效内容
var mContent = content.trimStart { var mContent = content.trimStart {
it.code <= 0x20 || it == ' ' || it == ',' || it == ',' || it == ',' it.code <= 0x20 || it == ' ' || it == ',' || it == ','
} }
//去除书名 //去除书名
if (mContent.startsWith(book.name)) { if (mContent.startsWith(book.name)) {
@ -76,7 +76,7 @@ class ContentProcessor private constructor(
} }
//去除无效内容 //去除无效内容
mContent = mContent.trimStart { mContent = mContent.trimStart {
it.code <= 0x20 || it == ' ' || it == ',' || it == ',' || it == ',' it.code <= 0x20 || it == ' ' || it == ',' || it == ','
} }
//去除标题 //去除标题
if (mContent.startsWith(chapter.title)) { if (mContent.startsWith(chapter.title)) {
@ -84,7 +84,7 @@ class ContentProcessor private constructor(
} }
//去除无效内容 //去除无效内容
mContent = mContent.trimStart { mContent = mContent.trimStart {
it.code <= 0x20 || it == ' ' || it == ',' || it == ',' || it == ',' it.code <= 0x20 || it == ' ' || it == ',' || it == ','
} }
if (includeTitle) { if (includeTitle) {
//重新添加标题 //重新添加标题

Loading…
Cancel
Save