Modul:Formatering
Utseende
Dokumentationen för denna modul kan skapas på Modul:Formatering/dok
local p = {}
function p.br_separated_entries(frame)
local res = ''
for _, v in ipairs(frame:getParent().args) do
if string.gsub(v,' ','') ~= '' then res = res .. v .. '<br />' end
end
return string.sub(res,1,-7)
end
function p.unbulleted_list(frame)
local args = frame:getParent().args
local ul_style = args['ul_style'] or ''
local res = '<div class="plainlist"><ul style="list-style:none none; margin-left: 0;' .. ul_style .. '">'
local li_style = args['li_style'] or ''
for i, v in ipairs(args) do
li_style_i = args['li_style'..i] or ''
if string.gsub(v,' ','') ~= '' then res = res .. '<li style="' .. li_style .. li_style_i .. '">' .. v .. '</li>' end
end
return res..'</ul></div>'
end
return p