Module:Based on and Module:Based on/sandbox: Difference between pages
Appearance
(Difference between pages)
Content deleted Content added
Include space |
No edit summary |
||
Line 1: | Line 1: | ||
local p = {} |
local p = {} |
||
function p. |
function p._main(args) |
||
local s = |
local s = args[1] |
||
⚫ | |||
⚫ | |||
⚫ | |||
:wikitext(s .. ' ') |
|||
:tag('br') |
|||
:done() |
|||
for i, v in ipairs(frame.args) do |
|||
:tag(args[3] and 'div' or 'span') |
|||
if i >= 2 then |
|||
:addClass('nowrap') |
|||
args[#args+1] = v |
|||
:tag('span') |
|||
end |
|||
:css('vertical-align', 'top') |
|||
end |
|||
⚫ | |||
:done() |
|||
args['style'] = 'display: inline' |
|||
args[ |
:tag(args[3] and 'div' or 'span') |
||
:addClass('wrap') |
|||
args['item1_style'] = 'display: inline' |
|||
:addClass(args[3] and 'plainlist') |
|||
:css('display', 'inline-block') |
|||
⚫ | |||
-- Prevents the text from spilling out |
|||
⚫ | |||
:css('padding-right', '1.25em') |
|||
h:tag('br') -- h:newline() is not working for some reason |
|||
:wikitext(args[3] and |
|||
'\n* ' .. table.concat(args, '\n* ', 2) .. '\n' |
|||
h:wikitext(frame:expandTemplate{ title = 'Unbulleted list', args = args }) |
|||
or args[2]) |
|||
:done() |
|||
return h |
|||
:done() |
|||
elseif frame.args[2] then |
|||
s = s .. '<br />by ' .. frame.args[2] |
|||
return s |
|||
end |
end |
||
return s |
return s |
||
end |
end |
||
function p.main(frame) |
function p.main(frame) |
||
-- mw.clone makes table.concat possible |
|||
return p. |
return p._main(mw.clone(frame:getParent().args)) |
||
end |
end |
||