This commit is contained in:
@@ -618,9 +618,11 @@ public class CustomScreenManager implements Listener {
|
||||
if (s.length() <= limit) return s.length();
|
||||
int searchEnd = Math.min(s.length() - 1, limit + tol);
|
||||
int best = -1;
|
||||
// 15m24 句末切点不再认\n(换行): 标题行"二、玩家权利与义务\n"的\n被当孤短切点,
|
||||
// 致第3/4页只有标题+一两句就切, 下面全空。只认。!?;真句末标点。
|
||||
for (int i = searchEnd; i >= 0; i--) {
|
||||
char c = s.charAt(i);
|
||||
if (c == '。' || c == '!' || c == '?' || c == ';' || c == '\n') {
|
||||
if (c == '。' || c == '!' || c == '?' || c == ';') {
|
||||
best = i + 1;
|
||||
break;
|
||||
}
|
||||
@@ -632,7 +634,7 @@ public class CustomScreenManager implements Listener {
|
||||
if (best > 0 && best <= limit + tol) return best;
|
||||
for (int i = Math.min(s.length() - 1, limit - 1); i >= 0; i--) {
|
||||
char c = s.charAt(i);
|
||||
if (c == ',' || c == ',' || c == '、' || c == ' ' || c == '\n') {
|
||||
if (c == ',' || c == ',' || c == '、' || c == ' ') {
|
||||
return i + 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user