Module:Infobox election/sandbox explained

local p = local args = local origArgs =

local function notblank(v) return (mw.text.trim(v or "") ~= "")end

function p.infobox(frame) for k,v in frame:getParent.args do if notblank(v) then origArgs[k] = mw.text.trim(v) end end for k,v in frame.args do if notblank(v) then origArgs[k] = mw.text.trim(v) end end local width = math.max((origArgs.map_image or origArgs.map) and (mw.ustring.match((origArgs.map_size or 300),"(%d*)")) or 0, (origArgs.map2_image or origArgs.map2) and (mw.ustring.match((origArgs.map2_size or 300),"(%d*)")) or 0, (origArgs.map3_image or origArgs.map3) and (mw.ustring.match((origArgs.map3_size or 300),"(%d*)")) or 0, (origArgs.map4_image or origArgs.map4) and (mw.ustring.match((origArgs.map4_size or 300),"(%d*)")) or 0 ) local pagetitle = frame:getParent and frame:getParent:getTitle or frame:getTitle args = return require('Module:Infobox').infoboxTemplate(frame:newChild )end