Module:重定向至此

此后如竟没有炬火,我便是唯一的光。
跳转到导航 跳转到搜索

可在Module:重定向至此/doc创建此模块的帮助文档

local xqy = {}

function xqy.main(frame)
	local p = nil
	local result = nil
	
	for _, v in ipairs( frame:getParent().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