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