今天是2024年9月28日 第39周 星期六

代人,时大变了。

我们生活在大地上,但我们的梦想超越天空。

“模块:WikitextLC”的版本间的差异

来自Akarin
跳到导航 跳到搜索
第3行: 第3行:
 
function p.selective( content )
 
function p.selective( content )
 
    local text = '-{'
 
    local text = '-{'
    for variant, value in content do
+
    for variant, value in pairs( content ) do
 
      if value == '' then
 
      if value == '' then
 
        value = '<span/>'
 
        value = '<span/>'

2013年4月14日 (日) 16:22的版本

50px 模块文档[创建]
local p = {}

function p.selective( content )
    local text = '-{'
    for variant, value in pairs( content ) do
        if value == '' then
            value = '<span/>'
        end
        text = text .. variant .. ':' .. value .. ';'
    end
    text = text .. '}-'
    return text
end

function p.converted( content, variant )
    return '-{' .. variant .. '|' .. content .. '}-'
end

return p