加入书名和作者处理

pull/300/head
gedoor 4 years ago
parent ce4d4bfb11
commit d5d844a423
  1. 4
      app/src/main/java/io/legado/app/help/BookHelp.kt

@ -112,13 +112,13 @@ object BookHelp {
fun formatBookName(name: String): String {
return name
.replace("(.*?)\\s+作\\s*者.*".toRegex(), "$1")
.replace("\\s+作\\s*者.*".toRegex(), "")
.trim { it <= ' ' }
}
fun formatBookAuthor(author: String): String {
return author
.replace(".*?作\\s*?者[::](.+)".toRegex(), "$1")
.replace(".*?作\\s*?者[::]".toRegex(), "")
.trim { it <= ' ' }
}

Loading…
Cancel
Save