"मोड्युल:Redirect" को बिचमी भिन्नता

ना
१ संशोधन आयात भयो: Importing from Incubator
imported>Nyttend
(Copying change per request of AlexTheWhovian. Please revert me if this causes some sort of error)
ना (१ संशोधन आयात भयो: Importing from Incubator)
-- Gets the target of a redirect. If the page specified is not a redirect,
-- returns nil.
function p.getTarget(page, fulltext)
-- Get the title object. Both page names and title objects are allowed
-- as input.
local targetTitle = getTitle(target)
if targetTitle then
return targetTitle.prefixedText
if fulltext then
return targetTitle.fullText
else
return targetTitle.prefixedText
end
else
return nil
error(string.format(
'could not parse redirect on page "%s"',
fulltext and titleObj.fullText or titleObj.prefixedText
))
end
-- target cannot be determined for some reason.
--]]
function p.luaMain(rname, bracket, fulltext)
if type(rname) ~= "string" or not rname:find("%S") then
return nil
bracket = bracket and "[[%s]]" or "%s"
rname = rname:match("%[%[(.+)%]%]") or rname
local target = p.getTarget(rname, fulltext)
local ret = target or rname
ret = getTitle(ret)
if ret then
ret = ret.prefixedText
if fulltext then
ret = ret.fullText
else
ret = ret.prefixedText
end
return bracket:format(ret)
else
function p.main(frame)
local args = require('Module:Arguments').getArgs(frame, {frameOnly = true})
return p.luaMain(args[1], args.bracket, args.fulltext) or ''
end
 

edit

"https://dty.wikipedia.org/wiki/बिशेष:MobileDiff/18081" बठे निकालियाऽ