1
0
Fork 0

fixed automatic capitalization not working at the beginning of the field, when there is already some text in it

This commit is contained in:
Dimo Karaivanov 2023-02-23 13:45:36 +02:00
parent 3c9d01a347
commit c523f0f0f1

View file

@ -37,7 +37,7 @@ public class ModePredictive extends InputMode {
private static Handler handleSuggestionsExternal;
// auto text case selection
private final Pattern startOfSentenceRegex = Pattern.compile("(?<!\\.)[.?!¿¡]\\s*$");
private final Pattern startOfSentenceRegex = Pattern.compile("(?<!\\.)(^|[.?!¿¡])\\s*$");
// punctuation/emoji
private final Pattern containsOnly1Regex = Pattern.compile("^1+$");