Module:Unsubst: Difference between revisions

Created page with "local p = {} local specialParams = { ['$N'] = 'template name', ['$B'] = 'template content', } p[''] = function ( frame ) if not frame:getParent() then error( '{{#invo..."
(Yay, no more hack!)
(Created page with "local p = {} local specialParams = { ['$N'] = 'template name', ['$B'] = 'template content', } p[''] = function ( frame ) if not frame:getParent() then error( '{{#invo...")
Line 1:
local p = {}
 
local specialParams = {
['$N'] = 'template name',
['$B'] = 'template content',
}
 
p[''] = function ( frame )
if not frame:getParent() then
Line 15:
end
end
if mw.isSubsting() then
---- substing
Line 31:
args[k] = v
end
 
-- Now, build an equivalent template invocation
-- First numbered args, then named
Line 46:
ret = ret .. '|' .. k .. '=' .. v
end
return ret .. '}}'
else
Line 54:
end
end
 
return p
Anonymous user