Module:Sandbox/Jackmcbarn: Difference between revisions

Content deleted Content added
Jackmcbarn (talk | contribs)
add parentName function
Jackmcbarn (talk | contribs)
figure out why this is so slow
Line 2:
 
function p.main(frame)
local given = frame.args[1]
return mw.loadData('Module:Sandbox/Jackmcbarn/data')[1]
if given == nil or given == '' then
end
return ""
 
end
function p.parentName(frame)
local args = {}
return frame:getParent():getTitle()
given = given .. "!"
for item in given:gmatch( "(.-)!") do
local p = item:find('=', 1, true)
if p then
args[item:sub(1, p-1)] = item:sub(p+1)
else
table.insert(args, item)
end
end
return frame:expandTemplate{ title = "convert/old", args = args }
end