跳转到内容

模組:WikitextLC

被永久保护的模块
维基百科,自由的百科全书

这是本页的一个历史版本,由Xiplus留言 | 贡献2018年4月30日 (一) 03:12 (已保护“模块:WikitextLC”:高风险模板([编辑=仅管理员](无限期)[移动=仅管理员](无限期)))编辑。这可能和当前版本存在着巨大的差异。

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