模組:NumBlk2
外观

local p = {}
function p.fmtN(frame)
local frame2 = frame:getParent()
local code = frame.args[1]
local code2 = mw.text.unstripNoWiki(code)
local code3 = mw.ustring.gsub(
code2, "%%(.)", function (ch)
if (ch == "i") or (ch == "l") then
return frame.args[ch]
elseif ch == "L" then
return "<";
elseif ch == "G" then
return ">";
end
return ch
end
)
local ret = frame2:preprocess(code3)
mw.log("code=" .. code .. "; code2=" .. code2 .. "; code3=" .. code3 .. "; ret=" .. ret .. ";")
return ret
end
return p