Module:消歧义

此后如竟没有炬火,我便是唯一的光。
物灵留言 | 贡献2021年4月30日 (五) 10:48的版本
跳转到导航 跳转到搜索

可在Module:消歧义/doc创建此模块的帮助文档

local xqy = {}

function xqy.main(frame)
	local p = nil
	local result = nil
	
	for _, v in ipairs( frame.args ) do
		if result == nil then
			result = '本页面介绍的是' .. v
		elseif p == nil then
			p = v
		else
			p =		p == ''		and	'。关于其他用法,请见'
				or	p == '和'	and	p 
				or					'。关于' .. p .. ',请见'
			result = result .. p .. '「[[' .. v .. ']]」'
			p = nil
		end
	end
	if p then
		result = result .. '。关于其他用法,请见[[「' .. p .. ']]」' 
	end
	return result .. '。'
end

return xqy