Module:Redirect: Difference between revisions
Content added Content deleted
Enwikipedia>Wnt (Temporarily breaking it -- it returned "2"!) |
Enwikipedia>Wnt (found it) |
||
Line 15: | Line 15: | ||
-- if rpage.fileExists then |
-- if rpage.fileExists then |
||
if rpage.isRedirect then |
if rpage.isRedirect then |
||
return (tostring(mw.ustring.find(tostring(rpage.getContent(rpage)),"REDIRECT.-%[%[(.-)%]%]")) or [=[<span style="text-color:red;">[[Module:redirect]] error: failed to understand - [[]=] .. rname .. [=[]]</span]=]) |
|||
return rpage.getContent(rpage) |
|||
else return rname -- not a redirect so leave the original text (for some general-purpose template use) |
else return rname -- not a redirect so leave the original text (for some general-purpose template use) |
||
end |
end |