Модуль:GetField: различия между версиями

Нет описания правки
Нет описания правки
 
Строка 225: Строка 225:
end
end


local function flatten_entry(entry)
local function flatten_parts(entry)
     if type(entry) ~= "table" then return "" end
     if type(entry) ~= "table" then return {} end


     local parts = {}
     local parts = {}
Строка 265: Строка 265:
     walk(entry, "")
     walk(entry, "")


    return parts
end
local function flatten_entry(entry)
    local parts = flatten_parts(entry)
    if #parts == 0 then
        return ""
    end
     return table.concat(parts, "|")
     return table.concat(parts, "|")
end
end
Строка 528: Строка 536:
     local result = table.concat(out, " ")
     local result = table.concat(out, " ")
     return preprocess_or_return(frame, result)
     return preprocess_or_return(frame, result)
end
function p.flattenParams(entry)
    return flatten_parts(entry)
end
end