词条 | Module:Sandbox/RexxS/Blacklist |
释义 | -- fragment to demo exact matching for field names in blacklist-- #invoke Sandbox/RexxS/Blacklist local p = {} p.isBlacklisted = function(frame) local blacklist = frame.args.suppressfields or "aaa; bbb; other title 1; ccc; ddd" local fieldname = frame.args.name or "title" if blacklist then blacklisted = false for wrd in string.gmatch(blacklist, "[^,;]+") do if fieldname == mw.text.trim(wrd) then blacklisted = true break end end if blacklisted then return "blacklisted" else return "not blacklisted" end end end return p |
随便看 |
开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。