မေႃႇၵျူး:Redirect and target

လုၵ်ႉတီႈ ဝီႇၶီႇၽီးတီးယႃး ဢၼ်လွတ်ႈလႅဝ်းထၢင်ႇႁၢင်ႈ ၼၼ်ႉမႃး
Documentation icon ၽိုၼ်ၵႅမ်မိုဝ်းမေႃႇၵျူး[တူၺ်း] [မႄးထတ်း] [ပိုၼ်း] [ၸၢင်း]

Implements {{redirect and target}}

လွင်ႈၸႂ်ႉတိုဝ်း[မႄးထတ်းငဝ်ႈငႃႇ]

{{#invoke:Redirect and target|function_name}}

local getTarget = require('Module:Redirect').getTarget
local p = {}

function p.line(frame)
	local pageTitle = frame.args[1]
	local target = getTarget(pageTitle)
	if target then
		return string.format('[[%s]] → [[%s]]', pageTitle, target)
	end
	return string.format('[[%s]] is not a redirect', pageTitle)
end

function p.report(frame)
	local pageTitle = frame.args[1]
	local target = getTarget(pageTitle)
	if target then
		return string.format('<i>[[%s]] (R)</i> → [[%s]]', pageTitle, target)
	end
	return string.format('[[%s]]', pageTitle)
end

return p