|
|
@ -231,9 +231,15 @@ object BookHelp { |
|
|
|
if (!c.substringBefore("\n").contains(title)) { |
|
|
|
if (!c.substringBefore("\n").contains(title)) { |
|
|
|
c = "$title\n$c" |
|
|
|
c = "$title\n$c" |
|
|
|
} |
|
|
|
} |
|
|
|
when (AppConfig.chineseConverterType) { |
|
|
|
try { |
|
|
|
1 -> c = ZhConvertBootstrap.newInstance().toSimple(c) |
|
|
|
when (AppConfig.chineseConverterType) { |
|
|
|
2 -> c = ZhConvertBootstrap.newInstance().toTraditional(c) |
|
|
|
1 -> c = ZhConvertBootstrap.newInstance().toSimple(c) |
|
|
|
|
|
|
|
2 -> c = ZhConvertBootstrap.newInstance().toTraditional(c) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} catch (e: Exception) { |
|
|
|
|
|
|
|
withContext(Main) { |
|
|
|
|
|
|
|
App.INSTANCE.toast("简繁转换出错") |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return c |
|
|
|
return c |
|
|
|
.replace("\\s*\\n+\\s*".toRegex(), "\n${ReadBookConfig.bodyIndent}") |
|
|
|
.replace("\\s*\\n+\\s*".toRegex(), "\n${ReadBookConfig.bodyIndent}") |
|
|
|