Модуль:GetField: различия между версиями
Pok (обсуждение | вклад) Новая страница: «local p = {} local function split(s, sep) if s == nil then return {} end local parts = {} sep = sep or "%." for part in string.gmatch(s, "([^" .. sep .. "]+)") do table.insert(parts, part) end return parts end local function parse_indexed_part(part) local key, idx = string.match(part, "^(.-)%[(%d+)%]$") if key then return key, tonumber(idx) end local num = tonumber(part) if num then return nil, num end return part, nil end local functio...» |
Pok (обсуждение | вклад) мНет описания правки |
||
| Строка 147: | Строка 147: | ||
flat[prefix] = format_value(tbl) | flat[prefix] = format_value(tbl) | ||
return | return | ||
end | |||
if prefix ~= "" then | |||
flat[prefix] = format_value(tbl) | |||
end | end | ||
if is_array(tbl) then | if is_array(tbl) then | ||