跳转到内容

模組:Vgname/testcases

维基百科,自由的百科全书

这是本页的一个历史版本,由風中的刀劍留言 | 贡献2015年1月25日 (日) 14:42 (bold() main() pass)编辑。这可能和当前版本存在着巨大的差异。

local getArgs = require('Module:Arguments').getArgs
local yesno = require('Module:Yesno')
local p = {}

local langList = {
}

local function bold(cont)

	if yesno(_bold) ~= false then
		cont = '<b>' .. cont .. '</b>'
	end
	
	return cont
end

local function main(t)
	local ret = t[1]
	
	ret = bold(ret)
	
	if yesno(t.bracket) ~= false then
		ret = '《' .. ret .. '》'
	end
	
	return ret
end

local function orig(t)
end

local function eng(t)
end

local function trans(t)
end

local function note(t)
end

function p.vgname(frame)
	local ret = ""
	
	local args = getArgs(frame, {
		parentOnly = true;
		valueFunc = function (key, value)
			if value == nil then
				return ''
			else
				return value
			end
		end;
	})
	_bold = args.bold
	_diff = args.diff
	
	------------------------------------------------------------------------

	local ret = main(args)
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	---------------------------------------------------------------
	
	return ret
end

return p