Module:Resolve redirect

local export = {} local replace = mw.ustring.gsub local find = mw.ustring.find

-- Remember that the main copy of the code is not here!!!! -- Remember that the main copy of the code is not here!!!! -- Remember that the main copy of the code is not here!!!! -- Remember that the main copy of the code is not here!!!! -- Remember that the main copy of the code is not here!!!! -- Remember that the main copy of the code is not here!!!! -- Remember that the main copy of the code is not here!!!!

function export.show(content) if find(content, "#[Rr][Ee][Dd][Ii][Rr][Ee][Cc][Tt]") then content = replace(content, "\n.*", "") -- keep first line content = replace(content, ".+%[%[", "") -- dispose of link opening content = replace(content, "%]%].*", "") -- and link end content = replace(content, "|.*", "") -- and link titles content = mw.title.new(content):getContent end return content end

return export