Documentation for this module may be created at Module:Sandbox/RichardW57m/expand/doc
local p = {}
function p.expand(page)
ctxt=mw.getCurrentFrame()
local newargs = {}
for t, v in pairs(ctxt.args) do newargs[t] = v end
newargs.p2="Fake parameter"
newargs.valign="super"
local ctxt2 = ctxt:newChild{args=newargs}
local text1 = ctxt2:preprocess("p1={{{p1}}} p2={{{p2}}}")
local text2 = ctxt2:preprocess("xx{{huge|up}}xx") -- Fails to take effect!
local text3 = ctxt2:expandTemplate{title='huge', args={'works', valign='super'}}
return text1..'\n\n'..text2..'\n\nxx'..text3..'xx'
end
return p