模組:HumorDistinguish
外观
local mHatnote = require('Module:Hatnote')
local mHatlist = require('Module:Hatnote list')
local mArguments --initialize lazily
local mTableTools --initialize lazily
local libraryUtil = require('libraryUtil')
local checkType = libraryUtil.checkType
local p = {}
function p.distinguish(frame)
mArguments = require('Module:Arguments')
mTableTools = require('Module:TableTools')
local args = mArguments.getArgs(frame)
local selfref = args.selfref
local text = args.text
args = mTableTools.compressSparseArray(args)
return p._distinguish(args, text, selfref)
end
function p._distinguish(args, text, selfref)
checkType("_distinguish", 1, args, 'table')
if #args == 0 and not text then return '' end
local image = '[[File:Confusion humor.svg|24px]]'
local text = string.format(
"'''餵雞溫馨提示''':各位幽默感缺失的編者,此處有對應的「%s」".. ages[text] .."正常版本以供食用。。",
text or mHatlist.orList(args, true, true)
)
text = image .. ' ' .. text
hnOptions = {selfref = selfref}
return mHatnote._hatnote(text, hnOptions)
end
function p.manylink(frame)
mArguments = require('Module:Arguments')
mTableTools = require('Module:TableTools')
local args = mArguments.getArgs(frame)
local selfref = args.selfref
local text = args.text
args = mTableTools.compressSparseArray(args)
return p._manylink(args, text, selfref)
end
function p._manylink(args, text, selfref)
checkType("_distinguish", 1, args, 'table')
if #args == 0 and not text then return '' end
local image = '[[File:Confusion humor.svg|24px]]'
local text = string.format(
"'''[[維基百科|餵雞]][[溫馨]][[提示]]'''[[:]][[各位]][[Wikipedia:坏笑话和删除的胡话|幽默]][[感]][[缺]][[失的]][[編者]][[,]][[此處]][[有對應]][[的]][[「]]%s[[」]][[正]][[常]][[版本]][[以]][[供食用]][[。]]。。",
text or mHatlist.orList(args, true, true)
)
text = image .. ' ' .. text
hnOptions = {selfref = selfref}
return mHatnote._hatnote(text, hnOptions)
end
return p