mirror of
https://github.com/gedoor/legado.git
synced 2024-09-01 09:34:25 +08:00
优化
This commit is contained in:
parent
a6d5efc1d7
commit
1fc92dd0d7
@ -323,7 +323,7 @@ class TextFile(private val book: Book) {
|
|||||||
val list = arrayListOf<Pattern>()
|
val list = arrayListOf<Pattern>()
|
||||||
var maxCs = 1
|
var maxCs = 1
|
||||||
for (tocRule in rules) {
|
for (tocRule in rules) {
|
||||||
val pattern = Pattern.compile(tocRule.rule, Pattern.MULTILINE)
|
val pattern = tocRule.rule.toPattern(Pattern.MULTILINE)
|
||||||
val matcher = pattern.matcher(content)
|
val matcher = pattern.matcher(content)
|
||||||
var cs = 0
|
var cs = 0
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user