Modulis:List to text
Lua kļūda Modulis:Documentation, 144. rinda: message: type error in message cfg.container (string expected, got nil).
local p = {}
function p.main(frame)
local res = {}
local text = mw.text.split(frame.args[1] or frame:getParent().args[1] or '', "\n%*%s*")
for i, v in ipairs(text) do
table.insert(res, v)
end
result = mw.ustring.gsub( mw.text.listToText(res, ', ', ' un ' ), '^, ', '' )
return result
end
function p.br(frame)
local res = {}
local text = mw.text.split(frame.args[1] or frame:getParent().args[1] or '', "%s*<br%s*/?>%s*")
for i, v in ipairs(text) do
table.insert(res, v)
end
return mw.text.listToText(res, ', ', ' un ' )
end
return p