15m32: protectCut加英文词保护(切点劈ASCII英文单词中间回退到词前), 修BUG被劈成B+UG; 配合编号保护让P18填满115不留白
Auto Release / build (push) Successful in 2m46s
Auto Release / build (push) Successful in 2m46s
This commit is contained in:
@@ -553,6 +553,14 @@ public class CustomScreenManager implements Listener {
|
||||
return Math.max(phraseStart - 1, cut - 12); // 回退到最外层"第"前, 整串编号翻页
|
||||
}
|
||||
}
|
||||
// 15m32: 英文词保护 - 切点若劈在ASCII英文单词中间(前字=字母且后字=字母), 回退到单词起点前
|
||||
char prev = s.charAt(cut - 1);
|
||||
char next = (cut < s.length()) ? s.charAt(cut) : 0;
|
||||
if (Character.isLetter(prev) && Character.isLetter(next) && prev < 128 && next < 128) {
|
||||
int wordStart = cut;
|
||||
while (wordStart > 0 && Character.isLetter(s.charAt(wordStart - 1)) && s.charAt(wordStart - 1) < 128) wordStart--;
|
||||
return Math.max(wordStart, cut - 12); // 回退到英文单词前
|
||||
}
|
||||
return cut;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user