Cleanup previous PR

Actually respect the fallback order when finding matching shortcuts
This commit is contained in:
Kovid Goyal
2026-03-26 09:30:14 +05:30
parent 3e5b3eb55d
commit 88ee80b327
8 changed files with 130 additions and 90 deletions

View File

@@ -259,7 +259,7 @@ func validateAllowFallback(value string) error {
if value == "" || value == "none" {
return nil
}
for _, part := range strings.Split(value, ",") {
for part := range strings.SplitSeq(value, ",") {
part = strings.TrimSpace(part)
if part != "shifted" && part != "ascii" {
return fmt.Errorf("Invalid allow-fallback value %#v, allowed values: shifted, ascii, none", part)