From 714e679c8f6dd542d68eea22b7314d006909ffda Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Fri, 3 Nov 2023 17:29:15 +0100 Subject: [PATCH] REPL: allow only lowercase letters in language codes --- include/REPL.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/REPL.awk b/include/REPL.awk index d817b291..ee836e55 100644 --- a/include/REPL.awk +++ b/include/REPL.awk @@ -168,7 +168,7 @@ function repl(line, command, group, name, i, value, words) { } else if (command ~ /^:reset$/) { # TODO: reset source and target languages, etc. } else { - match(command, /^[{(\[]?((@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?\+)*(@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?)?)?(:|=)((@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?\+)*(@?[[:alpha:]][[:alpha:]][[:alpha:]]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?)?)[})\]]?$/, group) + match(command, /^[{(\[]?((@?[a-z][a-z][a-z]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?\+)*(@?[a-z][a-z][a-z]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?)?)?(:|=)((@?[a-z][a-z][a-z]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?\+)*(@?[a-z][a-z][a-z]?(-[[:alpha:]][[:alpha:]][[:alpha:]]?[[:alpha:]]?)?)?)[})\]]?$/, group) if (RSTART) { if (group[1]) { split(group[1], Option["sls"], "+")