模块:WikitextLC
外观
此模块的文档可以在模块:WikitextLC/doc创建
local p = {}
function p.selective( content )
local text = '-{'
for variant, value in pairs( content ) do
if value == '' then
value = '<span></span>'
end
text = text .. variant .. ':' .. value .. ';'
end
text = text .. '}-'
return text
end
function p.converted( content, variant, force )
if type( variant ) == 'table' then
variant = table.concat( variant, ';' )
end
return '-{' .. ( force and '' or 'zh;' ) .. variant .. '|' .. content .. '}-'
end
function p.raw( content )
return '-{R|' .. content .. '}-'
end
function p.title( content )
return '-{T|' .. content .. '}-'
end
function p.hidden( content )
return '-{H|' .. content .. '}-'
end
return p