Module:Su: Difference between revisions

Content deleted Content added
m Changed protection level for "Module:Su": Highly visible template -upgrading to match template ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))
Per request
 
(One intermediate revision by one other user not shown)
Line 8:
-- uses named arguments, and whitespace is trimmed from them automatically.
local origArgs = frame:getParent().args
local args = {}
for k, v in pairs(origArgs) do
if v ~= '' then
args[k] = v
end
end
 
-- Define the variables to pass to luaMain.
local sup = args.p
local sub = args.b
local options = {
align = args.a,
fontSize = args.w,
lineHeight = args.lh,
verticalAlign = args.va
}
return p._main(sup, sub, options)
end
 
function p.invoke_main(frame)
-- entry point for invocation using frame arguments
local origArgs = frame.args
local args = {}
for k, v in pairs(origArgs) do
Line 69 ⟶ 92:
:wikitext(sub)
return '<span class="nowrap">' .. tostring(span) .. '</span>'
end