Content deleted Content added
"x" is case-insensitive in ABNF |
fix handling of three variants |
||
Line 446:
local last_matched_subtag_i = 0
for subtag_i, subtag in ipairs(potential_subtags) do
local
local matched = false
while not matched do
Line 452:
for _, pattern in ipairs(subtag_info[index]) do
if subtag:find("^" .. pattern .. "$") then
matched = true
-- There can be multiple "variant" subtags (and "extension"
-- subtags, if those are added)
if
index = index + 1
end
Line 471:
end
if
if parsed_subtags[
if type(parsed_subtags[
end -- else table
table.insert(parsed_subtags[subtag_type], subtag)
else
parsed_subtags[
end
last_matched_subtag_i = subtag_i
|