Skip to content

Commit

Permalink
REPL: allow only lowercase letters in language codes
Browse files Browse the repository at this point in the history
  • Loading branch information
soimort committed Nov 3, 2023
1 parent 33ce448 commit 714e679
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/REPL.awk
Original file line number Diff line number Diff line change
Expand Up @@ -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"], "+")
Expand Down

0 comments on commit 714e679

Please sign in to comment.