Content deleted Content added
Petr Matas (talk | contribs) pcall encapsulation is now provided by Module:Protect |
Add support for tables |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1:
local
local function main(frame, field)
local args, pargs = frame.args, ( frame:getParent() or {} ).args or {}
local makeTitle=args.makeTitle or pargs.makeTitle
local namespace=args.namespace or pargs.namespace or ""
local fragment=args.fragment or pargs.fragment or ""
Line 39 ⟶ 28:
if type(result) == "function" then
result = result(title, unpack(pn))
elseif type(result) == "table" then
result = mw.text.listToText(result)
end
Line 60 ⟶ 51:
function p.getContent(frame)
local args, pargs = frame.args, ( frame:getParent() or {} ).args or {}
local fmt = args.as or pargs.as or
local text = main(frame, "getContent")
fmt = mw.text.split( fmt, ", ?" )
|