模块:PFTest
|
|
|
|
|
| ||||||
aa bb |
local p={} function p.gentable(s) local sImgL,sImgR=[[<img src="//tetriswiki.cn/tet/]],[[Tet.png">]] local sRow="<div>"..string.rep(sImgL..sImgR,10).."</div>" local sField=string.rep(sRow,20) local sAll= [=[{| class="pfield" style="line-height: 10px; font-size: 7px; border: 1px solid #999" |]=]..sField.."\n|}" return sAll end function p.test(frame) local argfield=frame.args[1] -- return mw:getCurrentFrame():preprocess(sAll) -- return p.gentable(argfield) return argfield==nil and "NIL" or argfield end return p