可在模块:背景/doc创建此模块的帮助文档
local p = {}
local DATA = mw.loadData('模块:背景/data')
function p.get_background_list(frame)
local delimiter = frame.args[1] or ','
return p._get_background_list(delimiter)
end
function p._get_background_list(delimiter)
local buffer = {}
for _, v in ipairs(DATA.generated_background_list) do
table.insert(buffer, v)
end
return table.concat(buffer, delimiter)
end
function p.test_background_name_list()
local flag, result = pcall(p._get_background_list, ',')
return mw.dumpObject(result)
end
return p