mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-04-29 09:25:41 +08:00
Make layoutCandidates case insensitive per https://github.com/simple-keyboard/simple-keyboard-layouts/issues/1151
This commit is contained in:
parent
ba894c34b2
commit
3b87f1df02
@ -322,7 +322,7 @@ class SimpleKeyboard {
|
|||||||
(layoutCandidate: string) => {
|
(layoutCandidate: string) => {
|
||||||
const inputSubstr =
|
const inputSubstr =
|
||||||
input.substring(0, this.getCaretPositionEnd() || 0) || input;
|
input.substring(0, this.getCaretPositionEnd() || 0) || input;
|
||||||
const regexp = new RegExp(`${layoutCandidate}$`, "g");
|
const regexp = new RegExp(`${layoutCandidate}$`, "gi");
|
||||||
const matches = [...inputSubstr.matchAll(regexp)];
|
const matches = [...inputSubstr.matchAll(regexp)];
|
||||||
return !!matches.length;
|
return !!matches.length;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user